summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-sched.c
diff options
context:
space:
mode:
authorPaolo Valente <paolo.valente@linaro.org>2017-02-07 18:24:43 +0100
committerJens Axboe <axboe@fb.com>2017-02-10 17:09:59 +0100
commitf1ba82616c3368e1ae9e64ef29cf3edc1be0860d (patch)
treeca90d2ba3a4aa80c593a7a6af6ef8593caa01091 /block/blk-mq-sched.c
parentblock: fix double-free in the failure path of cgwb_bdi_init() (diff)
downloadlinux-f1ba82616c3368e1ae9e64ef29cf3edc1be0860d.tar.xz
linux-f1ba82616c3368e1ae9e64ef29cf3edc1be0860d.zip
blk-mq: pass bio to blk_mq_sched_get_rq_priv
bio is used in bfq-mq's get_rq_priv, to get the request group. We could pass directly the group here, but I thought that passing the bio was more general, giving the possibility to get other pieces of information if needed. Signed-off-by: Paolo Valente <paolo.valente@linaro.org> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-sched.c')
-rw-r--r--block/blk-mq-sched.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index 72d0d8361175..97fe904f0a04 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -68,7 +68,9 @@ error:
EXPORT_SYMBOL_GPL(blk_mq_sched_init_hctx_data);
static void __blk_mq_sched_assign_ioc(struct request_queue *q,
- struct request *rq, struct io_context *ioc)
+ struct request *rq,
+ struct bio *bio,
+ struct io_context *ioc)
{
struct io_cq *icq;
@@ -83,7 +85,7 @@ static void __blk_mq_sched_assign_ioc(struct request_queue *q,
}
rq->elv.icq = icq;
- if (!blk_mq_sched_get_rq_priv(q, rq)) {
+ if (!blk_mq_sched_get_rq_priv(q, rq, bio)) {
rq->rq_flags |= RQF_ELVPRIV;
get_io_context(icq->ioc);
return;
@@ -99,7 +101,7 @@ static void blk_mq_sched_assign_ioc(struct request_queue *q,
ioc = rq_ioc(bio);
if (ioc)
- __blk_mq_sched_assign_ioc(q, rq, ioc);
+ __blk_mq_sched_assign_ioc(q, rq, bio, ioc);
}
struct request *blk_mq_sched_get_request(struct request_queue *q,