summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-04-16 09:44:56 +0200
committerJens Axboe <axboe@fb.com>2014-04-16 14:15:25 -0600
commit2f268556567ebeb3538f99b9bdad177581439dcb (patch)
tree67e3406c30d8998c8fc1a12a43af0ab4139b5206 /block/blk-mq.c
parent70f4db639c5b2479e08657392cbf3ba3cceea11c (diff)
blk-mq: add blk_mq_start_hw_queues
Add a helper to unconditionally kick contexts of a queue. This will be needed by the SCSI layer to provide fair queueing between multiple devices on a single host. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 0cf52dddfa6b..543bbc08a261 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -701,6 +701,17 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx)
}
EXPORT_SYMBOL(blk_mq_start_hw_queue);
+void blk_mq_start_hw_queues(struct request_queue *q)
+{
+ struct blk_mq_hw_ctx *hctx;
+ int i;
+
+ queue_for_each_hw_ctx(q, hctx, i)
+ blk_mq_start_hw_queue(hctx);
+}
+EXPORT_SYMBOL(blk_mq_start_hw_queues);
+
+
void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async)
{
struct blk_mq_hw_ctx *hctx;