• Ming Lei's avatar
    nvme: use blk_mq_start_hw_queues() in nvme_kill_queues() · 806f026f
    Ming Lei authored
    Inside nvme_kill_queues(), we have to start hw queues for
    draining requests in sw queues, .dispatch list and requeue list,
    so use blk_mq_start_hw_queues() instead of blk_mq_start_stopped_hw_queues()
    which only run queues if queues are stopped, but the queues may have
    been started already, for example nvme_start_queues() is called in reset work
    function.
    
    blk_mq_start_hw_queues() run hw queues in current context, instead
    of running asynchronously like before. Given nvme_kill_queues() is
    run from either remove context or reset worker context, both are fine
    to run hw queue directly. And the mutex of namespaces_mutex isn't a
    problem too becasue nvme_start_freeze() runs hw queue in this way
    already.
    
    Cc: stable@vger.kernel.org
    Reported-by: default avatarZhang Yi <yizhan@redhat.com>
    Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
    Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
    Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    806f026f
core.c 62.9 KB