Skip to content

Commit 443bd90

Browse files
Ming Leiaxboe
authored andcommitted
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: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 641a9ed commit 443bd90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/nvme/host/core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,6 +2581,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl)
25812581

25822582
mutex_lock(&ctrl->namespaces_mutex);
25832583

2584+
/* Forcibly unquiesce queues to avoid blocking dispatch */
2585+
blk_mq_unquiesce_queue(ctrl->admin_q);
2586+
25842587
/* Forcibly start all queues to avoid having stuck requests */
25852588
blk_mq_start_hw_queues(ctrl->admin_q);
25862589

@@ -2594,6 +2597,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl)
25942597
revalidate_disk(ns->disk);
25952598
blk_set_queue_dying(ns->queue);
25962599

2600+
/* Forcibly unquiesce queues to avoid blocking dispatch */
2601+
blk_mq_unquiesce_queue(ns->queue);
2602+
25972603
/*
25982604
* Forcibly start all queues to avoid having stuck requests.
25992605
* Note that we must ensure the queues are not stopped

0 commit comments

Comments
 (0)