diff options
author | Ming Lei <ming.lei@redhat.com> | 2017-06-19 10:21:08 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-18 20:52:58 -0600 |
commit | 443bd90f2cca9dec3db9ef9460a9c2a6f095f789 (patch) | |
tree | f4c5e7ad4bc15b14eeee66211edefb7b8c62f1e1 /drivers/nvme | |
parent | 641a9ed60f3620936921a58fb21d9f3aa891f3a4 (diff) | |
download | linux-443bd90f2cca9dec3db9ef9460a9c2a6f095f789.tar.bz2 |
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 05f713e866f6..aee37b73231d 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2581,6 +2581,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl) 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 */ blk_mq_start_hw_queues(ctrl->admin_q); @@ -2594,6 +2597,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl) revalidate_disk(ns->disk); 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. * Note that we must ensure the queues are not stopped |