blk-mq: use the introduced blk_mq_unquiesce_queue()
authorMing Lei <ming.lei@redhat.com>
Tue, 6 Jun 2017 15:22:04 +0000 (23:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 18 Jun 2017 20:20:04 +0000 (14:20 -0600)
blk_mq_unquiesce_queue() is used for unquiescing the
queue explicitly, so replace blk_mq_start_stopped_hw_queues()
with it.

For the scsi part, this patch takes Bart's suggestion to
switch to block quiesce/unquiesce API completely.

Cc: linux-nvme@lists.infradead.org
Cc: linux-scsi@vger.kernel.org
Cc: dm-devel@redhat.com
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm-rq.c
drivers/nvme/host/core.c
drivers/scsi/scsi_lib.c

index fafd5326e5726c9843548ac3e7803997ef7008ec..c6ebc5b1e00eb8be80e94ea2f31c190613fb4244 100644 (file)
@@ -71,7 +71,7 @@ static void dm_old_start_queue(struct request_queue *q)
 
 static void dm_mq_start_queue(struct request_queue *q)
 {
-       blk_mq_start_stopped_hw_queues(q, true);
+       blk_mq_unquiesce_queue(q);
        blk_mq_kick_requeue_list(q);
 }
 
index 0ddd6b9af7fc5afada061e5ca8f79191a778a99f..05f713e866f679bc33c92a9fb8307be6ef3d2e25 100644 (file)
@@ -2672,7 +2672,7 @@ void nvme_start_queues(struct nvme_ctrl *ctrl)
 
        mutex_lock(&ctrl->namespaces_mutex);
        list_for_each_entry(ns, &ctrl->namespaces, list) {
-               blk_mq_start_stopped_hw_queues(ns->queue, true);
+               blk_mq_unquiesce_queue(ns->queue);
                blk_mq_kick_requeue_list(ns->queue);
        }
        mutex_unlock(&ctrl->namespaces_mutex);
index b5f310b9e91079802f152b6e5ed9f03a7f5b6569..fb18ed284e55ae34b4ad7143b8fdd895b611e517 100644 (file)
@@ -2962,7 +2962,7 @@ scsi_internal_device_block(struct scsi_device *sdev, bool wait)
                if (wait)
                        blk_mq_quiesce_queue(q);
                else
-                       blk_mq_stop_hw_queues(q);
+                       blk_mq_quiesce_queue_nowait(q);
        } else {
                spin_lock_irqsave(q->queue_lock, flags);
                blk_stop_queue(q);
@@ -3016,7 +3016,7 @@ scsi_internal_device_unblock(struct scsi_device *sdev,
                return -EINVAL;
 
        if (q->mq_ops) {
-               blk_mq_start_stopped_hw_queues(q, false);
+               blk_mq_unquiesce_queue(q);
        } else {
                spin_lock_irqsave(q->queue_lock, flags);
                blk_start_queue(q);