提交 443bd90f 编写于 作者: M Ming Lei 提交者: Jens Axboe

nvme: host: unquiesce queue in nvme_kill_queues()

When nvme_kill_queues() is run, queues may be in
quiesced state, so we forcibly unquiesce queues to avoid
blocking dispatch, and I/O hang can be avoided in
remove path.

Peviously we use blk_mq_start_stopped_hw_queues() as
counterpart of blk_mq_quiesce_queue(), now we have
introduced blk_mq_unquiesce_queue(), so use it explicitly.

Cc: linux-nvme@lists.infradead.org
Signed-off-by: NMing Lei <ming.lei@redhat.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 641a9ed6
...@@ -2581,6 +2581,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl) ...@@ -2581,6 +2581,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl)
mutex_lock(&ctrl->namespaces_mutex); mutex_lock(&ctrl->namespaces_mutex);
/* Forcibly unquiesce queues to avoid blocking dispatch */
blk_mq_unquiesce_queue(ctrl->admin_q);
/* Forcibly start all queues to avoid having stuck requests */ /* Forcibly start all queues to avoid having stuck requests */
blk_mq_start_hw_queues(ctrl->admin_q); blk_mq_start_hw_queues(ctrl->admin_q);
...@@ -2594,6 +2597,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl) ...@@ -2594,6 +2597,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl)
revalidate_disk(ns->disk); revalidate_disk(ns->disk);
blk_set_queue_dying(ns->queue); blk_set_queue_dying(ns->queue);
/* Forcibly unquiesce queues to avoid blocking dispatch */
blk_mq_unquiesce_queue(ns->queue);
/* /*
* Forcibly start all queues to avoid having stuck requests. * Forcibly start all queues to avoid having stuck requests.
* Note that we must ensure the queues are not stopped * Note that we must ensure the queues are not stopped
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册