diff options
author | Mike Snitzer <snitzer@redhat.com> | 2015-03-11 23:56:38 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-03-13 10:28:33 -0400 |
commit | b94ec296403e99d5ac9a8c48332cec4118d44b94 (patch) | |
tree | 436fc728ffbc9d83c3a1876b9fc961e6906f6634 /block | |
parent | b62c21b71f08b7a4bfd025616ff1da2913a82904 (diff) |
blk-mq: export blk_mq_run_hw_queues
Rename blk_mq_run_queues to blk_mq_run_hw_queues, add async argument,
and export it.
DM's suspend support must be able to run the queue without starting
stopped hw queues.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-mq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 3000121840bb..06614ce0f475 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -33,7 +33,6 @@ static DEFINE_MUTEX(all_q_mutex); | |||
33 | static LIST_HEAD(all_q_list); | 33 | static LIST_HEAD(all_q_list); |
34 | 34 | ||
35 | static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx); | 35 | static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx); |
36 | static void blk_mq_run_queues(struct request_queue *q); | ||
37 | 36 | ||
38 | /* | 37 | /* |
39 | * Check if any of the ctx's have pending work in this hardware queue | 38 | * Check if any of the ctx's have pending work in this hardware queue |
@@ -118,7 +117,7 @@ void blk_mq_freeze_queue_start(struct request_queue *q) | |||
118 | 117 | ||
119 | if (freeze) { | 118 | if (freeze) { |
120 | percpu_ref_kill(&q->mq_usage_counter); | 119 | percpu_ref_kill(&q->mq_usage_counter); |
121 | blk_mq_run_queues(q); | 120 | blk_mq_run_hw_queues(q, false); |
122 | } | 121 | } |
123 | } | 122 | } |
124 | EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_start); | 123 | EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_start); |
@@ -904,7 +903,7 @@ void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) | |||
904 | &hctx->run_work, 0); | 903 | &hctx->run_work, 0); |
905 | } | 904 | } |
906 | 905 | ||
907 | static void blk_mq_run_queues(struct request_queue *q) | 906 | void blk_mq_run_hw_queues(struct request_queue *q, bool async) |
908 | { | 907 | { |
909 | struct blk_mq_hw_ctx *hctx; | 908 | struct blk_mq_hw_ctx *hctx; |
910 | int i; | 909 | int i; |
@@ -915,9 +914,10 @@ static void blk_mq_run_queues(struct request_queue *q) | |||
915 | test_bit(BLK_MQ_S_STOPPED, &hctx->state)) | 914 | test_bit(BLK_MQ_S_STOPPED, &hctx->state)) |
916 | continue; | 915 | continue; |
917 | 916 | ||
918 | blk_mq_run_hw_queue(hctx, false); | 917 | blk_mq_run_hw_queue(hctx, async); |
919 | } | 918 | } |
920 | } | 919 | } |
920 | EXPORT_SYMBOL(blk_mq_run_hw_queues); | ||
921 | 921 | ||
922 | void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx) | 922 | void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx) |
923 | { | 923 | { |