diff options
author | Jens Axboe <axboe@fb.com> | 2015-12-28 15:01:22 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-12-28 15:07:07 -0500 |
commit | 21491412f2ec6f13d4104de734dec0ba659d092e (patch) | |
tree | 592f39218219dcc03dec67438fcdf139b6836d51 /block | |
parent | d3805611130af9b911e908af9f67a3f64f4f0914 (diff) |
block: add blk_start_queue_async()
We currently only have an inline/sync helper to restart a stopped
queue. If drivers need an async version, they have to roll their
own. Add a generic helper instead.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index c487b94c59e3..33e2f62d5062 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -207,6 +207,22 @@ void blk_delay_queue(struct request_queue *q, unsigned long msecs) | |||
207 | EXPORT_SYMBOL(blk_delay_queue); | 207 | EXPORT_SYMBOL(blk_delay_queue); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | * blk_start_queue_async - asynchronously restart a previously stopped queue | ||
211 | * @q: The &struct request_queue in question | ||
212 | * | ||
213 | * Description: | ||
214 | * blk_start_queue_async() will clear the stop flag on the queue, and | ||
215 | * ensure that the request_fn for the queue is run from an async | ||
216 | * context. | ||
217 | **/ | ||
218 | void blk_start_queue_async(struct request_queue *q) | ||
219 | { | ||
220 | queue_flag_clear(QUEUE_FLAG_STOPPED, q); | ||
221 | blk_run_queue_async(q); | ||
222 | } | ||
223 | EXPORT_SYMBOL(blk_start_queue_async); | ||
224 | |||
225 | /** | ||
210 | * blk_start_queue - restart a previously stopped queue | 226 | * blk_start_queue - restart a previously stopped queue |
211 | * @q: The &struct request_queue in question | 227 | * @q: The &struct request_queue in question |
212 | * | 228 | * |