Commit b94ec296403e99d5ac9a8c48332cec4118d44b94
Committed by
Jens Axboe
1 parent
b62c21b71f
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 2 changed files with 5 additions and 4 deletions Side-by-side Diff
block/blk-mq.c
... | ... | @@ -33,7 +33,6 @@ |
33 | 33 | static LIST_HEAD(all_q_list); |
34 | 34 | |
35 | 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 | 38 | * Check if any of the ctx's have pending work in this hardware queue |
... | ... | @@ -118,7 +117,7 @@ |
118 | 117 | |
119 | 118 | if (freeze) { |
120 | 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 | 123 | EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_start); |
... | ... | @@ -904,7 +903,7 @@ |
904 | 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 | 908 | struct blk_mq_hw_ctx *hctx; |
910 | 909 | int i; |
911 | 910 | |
... | ... | @@ -915,9 +914,10 @@ |
915 | 914 | test_bit(BLK_MQ_S_STOPPED, &hctx->state)) |
916 | 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 | 922 | void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx) |
923 | 923 | { |
include/linux/blk-mq.h
... | ... | @@ -220,6 +220,7 @@ |
220 | 220 | void blk_mq_stop_hw_queues(struct request_queue *q); |
221 | 221 | void blk_mq_start_hw_queues(struct request_queue *q); |
222 | 222 | void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async); |
223 | +void blk_mq_run_hw_queues(struct request_queue *q, bool async); | |
223 | 224 | void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); |
224 | 225 | void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn, |
225 | 226 | void *priv); |