aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2014-09-25 11:23:46 -0400
committerJens Axboe <axboe@fb.com>2014-09-25 17:22:44 -0400
commite97c293cdf77263abdc021de280516e0017afc84 (patch)
tree77e1bef4a3835fdbfe5975c78b3d0ba53f266459 /block/blk.h
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 <ming.lei@canonical.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk.h b/block/blk.h
index 9eaa6e91b13f..7ecdd8517e69 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -29,7 +29,7 @@ extern struct kobj_type blk_queue_ktype;
29extern struct ida blk_queue_ida; 29extern struct ida blk_queue_ida;
30 30
31static inline struct blk_flush_queue *blk_get_flush_queue( 31static inline struct blk_flush_queue *blk_get_flush_queue(
32 struct request_queue *q) 32 struct request_queue *q, struct blk_mq_ctx *ctx)
33{ 33{
34 return q->fq; 34 return q->fq;
35} 35}
@@ -106,7 +106,7 @@ void blk_insert_flush(struct request *rq);
106static inline struct request *__elv_next_request(struct request_queue *q) 106static inline struct request *__elv_next_request(struct request_queue *q)
107{ 107{
108 struct request *rq; 108 struct request *rq;
109 struct blk_flush_queue *fq = blk_get_flush_queue(q); 109 struct blk_flush_queue *fq = blk_get_flush_queue(q, NULL);
110 110
111 while (1) { 111 while (1) {
112 if (!list_empty(&q->queue_head)) { 112 if (!list_empty(&q->queue_head)) {