path: root/block/blk-core.c
diff options
authorMing Lei <>2014-09-25 23:23:46 +0800
committerJens Axboe <>2014-09-25 15:22:44 -0600
commite97c293cdf77263abdc021de280516e0017afc84 (patch)
tree77e1bef4a3835fdbfe5975c78b3d0ba53f266459 /block/blk-core.c
parent0bae352da54a95435f721705d3670a6eaefdcf87 (diff)
block: introduce 'blk_mq_ctx' parameter to blk_get_flush_queue
This patch adds 'blk_mq_ctx' parameter to blk_get_flush_queue(), so that this function can find the corresponding blk_flush_queue bound with current mq context since the flush queue will become per hw-queue. For legacy queue, the parameter can be simply 'NULL'. For multiqueue case, the parameter should be set as the context from which the related request is originated. With this context info, the hw queue and related flush queue can be found easily. Signed-off-by: Ming Lei <> Signed-off-by: Jens Axboe <>
Diffstat (limited to 'block/blk-core.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index dba0a8350807..b1dd4e086740 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -390,7 +390,7 @@ static void __blk_drain_queue(struct request_queue *q, bool drain_all)
* be drained. Check all the queues and counters.
if (drain_all) {
- struct blk_flush_queue *fq = blk_get_flush_queue(q);
+ struct blk_flush_queue *fq = blk_get_flush_queue(q, NULL);
drain |= !list_empty(&q->queue_head);
for (i = 0; i < 2; i++) {
drain |= q->nr_rqs[i];