diff options
author | Christoph Hellwig <hch@lst.de> | 2014-04-16 03:44:54 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-16 16:15:25 -0400 |
commit | 1b4a325858f695a9b5041313602d34b36f463724 (patch) | |
tree | fb42ab8f36cab8665e60e9788afff434333bc135 | |
parent | 91b63639c7d59dbf86da5311faff43691dcae832 (diff) |
blk-mq: add async parameter to blk_mq_start_stopped_hw_queues
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | block/blk-mq.c | 4 | ||||
-rw-r--r-- | drivers/block/virtio_blk.c | 4 | ||||
-rw-r--r-- | include/linux/blk-mq.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 963a82109386..da3808823e44 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -700,7 +700,7 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx) | |||
700 | } | 700 | } |
701 | EXPORT_SYMBOL(blk_mq_start_hw_queue); | 701 | EXPORT_SYMBOL(blk_mq_start_hw_queue); |
702 | 702 | ||
703 | void blk_mq_start_stopped_hw_queues(struct request_queue *q) | 703 | void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async) |
704 | { | 704 | { |
705 | struct blk_mq_hw_ctx *hctx; | 705 | struct blk_mq_hw_ctx *hctx; |
706 | int i; | 706 | int i; |
@@ -711,7 +711,7 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q) | |||
711 | 711 | ||
712 | clear_bit(BLK_MQ_S_STOPPED, &hctx->state); | 712 | clear_bit(BLK_MQ_S_STOPPED, &hctx->state); |
713 | preempt_disable(); | 713 | preempt_disable(); |
714 | blk_mq_run_hw_queue(hctx, true); | 714 | blk_mq_run_hw_queue(hctx, async); |
715 | preempt_enable(); | 715 | preempt_enable(); |
716 | } | 716 | } |
717 | } | 717 | } |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index f909a8821e65..7a51f065edcd 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -151,7 +151,7 @@ static void virtblk_done(struct virtqueue *vq) | |||
151 | 151 | ||
152 | /* In case queue is stopped waiting for more buffers. */ | 152 | /* In case queue is stopped waiting for more buffers. */ |
153 | if (req_done) | 153 | if (req_done) |
154 | blk_mq_start_stopped_hw_queues(vblk->disk->queue); | 154 | blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); |
155 | } | 155 | } |
156 | 156 | ||
157 | static int virtio_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *req) | 157 | 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) | |||
762 | vblk->config_enable = true; | 762 | vblk->config_enable = true; |
763 | ret = init_vq(vdev->priv); | 763 | ret = init_vq(vdev->priv); |
764 | if (!ret) | 764 | if (!ret) |
765 | blk_mq_start_stopped_hw_queues(vblk->disk->queue); | 765 | blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); |
766 | 766 | ||
767 | return ret; | 767 | return ret; |
768 | } | 768 | } |
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index a81b474b794f..9ecfab96d8c9 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
@@ -157,7 +157,7 @@ void blk_mq_complete_request(struct request *rq); | |||
157 | void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx); | 157 | void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx); |
158 | void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx); | 158 | void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx); |
159 | void blk_mq_stop_hw_queues(struct request_queue *q); | 159 | void blk_mq_stop_hw_queues(struct request_queue *q); |
160 | void blk_mq_start_stopped_hw_queues(struct request_queue *q); | 160 | void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async); |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * Driver command data is immediately after the request. So subtract request | 163 | * Driver command data is immediately after the request. So subtract request |