• M
    nvme: use blk_mq_start_hw_queues() in nvme_kill_queues() · 806f026f
    Ming Lei 提交于
    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: NZhang Yi <yizhan@redhat.com>
    Reviewed-by: NKeith Busch <keith.busch@intel.com>
    Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
    Signed-off-by: NMing Lei <ming.lei@redhat.com>
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    806f026f
core.c 62.9 KB