diff options
author | Jens Axboe | 2016-12-08 13:19:30 -0700 |
---|---|---|
committer | Jens Axboe | 2016-12-09 09:03:02 -0700 |
commit | ae911c5e796d51cb2d1ed3a55e73b9cc88d176cf (patch) | |
tree | 8d13dbeff76c57c2f61a19a13e64dbda40c04b9c /block | |
parent | f9d03f96b988002027d4b28ea1b7a24729a4c9b5 (diff) |
blk-mq: add blk_mq_start_stopped_hw_queue()
We have a variant for all hardware queues, but not one for a single
hardware queue.
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-mq.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 90db5b490df9..c993476b630f 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1064,18 +1064,23 @@ void blk_mq_start_hw_queues(struct request_queue *q) } EXPORT_SYMBOL(blk_mq_start_hw_queues); +void blk_mq_start_stopped_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) +{ + if (!blk_mq_hctx_stopped(hctx)) + return; + + clear_bit(BLK_MQ_S_STOPPED, &hctx->state); + blk_mq_run_hw_queue(hctx, async); +} +EXPORT_SYMBOL_GPL(blk_mq_start_stopped_hw_queue); + void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async) { struct blk_mq_hw_ctx *hctx; int i; - queue_for_each_hw_ctx(q, hctx, i) { - if (!blk_mq_hctx_stopped(hctx)) - continue; - - clear_bit(BLK_MQ_S_STOPPED, &hctx->state); - blk_mq_run_hw_queue(hctx, async); - } + queue_for_each_hw_ctx(q, hctx, i) + blk_mq_start_stopped_hw_queue(hctx, async); } EXPORT_SYMBOL(blk_mq_start_stopped_hw_queues); |