blk-mq: add async parameter to blk_mq_start_stopped_hw_queues
authorChristoph Hellwig <hch@lst.de>
Wed, 16 Apr 2014 07:44:54 +0000 (09:44 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 16 Apr 2014 20:15:25 +0000 (14:15 -0600)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c
drivers/block/virtio_blk.c
include/linux/blk-mq.h

index 963a8210938624d3db05ca3d609791b25c7a356b..da3808823e44ec76a98203517bede8f3e58ef611 100644 (file)
@@ -700,7 +700,7 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx)
 }
 EXPORT_SYMBOL(blk_mq_start_hw_queue);
 
-void blk_mq_start_stopped_hw_queues(struct request_queue *q)
+void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async)
 {
        struct blk_mq_hw_ctx *hctx;
        int i;
@@ -711,7 +711,7 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q)
 
                clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
                preempt_disable();
-               blk_mq_run_hw_queue(hctx, true);
+               blk_mq_run_hw_queue(hctx, async);
                preempt_enable();
        }
 }
index f909a8821e65786eb8148629fa33eb299bd28bf6..7a51f065edcd94b685b0921689a7efa548f69f75 100644 (file)
@@ -151,7 +151,7 @@ static void virtblk_done(struct virtqueue *vq)
 
        /* In case queue is stopped waiting for more buffers. */
        if (req_done)
-               blk_mq_start_stopped_hw_queues(vblk->disk->queue);
+               blk_mq_start_stopped_hw_queues(vblk->disk->queue, true);
 }
 
 static int virtio_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *req)
@@ -762,7 +762,7 @@ static int virtblk_restore(struct virtio_device *vdev)
        vblk->config_enable = true;
        ret = init_vq(vdev->priv);
        if (!ret)
-               blk_mq_start_stopped_hw_queues(vblk->disk->queue);
+               blk_mq_start_stopped_hw_queues(vblk->disk->queue, true);
 
        return ret;
 }
index a81b474b794fbf7a91c9fd57bc15dc0e8c0d8da1..9ecfab96d8c9b4a2ac95c54d2a4ba70a49905d12 100644 (file)
@@ -157,7 +157,7 @@ void blk_mq_complete_request(struct request *rq);
 void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx);
 void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx);
 void blk_mq_stop_hw_queues(struct request_queue *q);
-void blk_mq_start_stopped_hw_queues(struct request_queue *q);
+void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async);
 
 /*
  * Driver command data is immediately after the request. So subtract request