diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-11-13 11:18:32 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-29 06:38:44 -0700 |
commit | 5a9d041ba2f6da468c891ca0fe263758e2c12091 (patch) | |
tree | b3d5bcc519faf89478dfd375f9f1590f1e759216 /block/bfq-iosched.c | |
parent | 48b5c1fbcd8c5bc6b91a56399a5257b801391dd8 (diff) | |
download | lwn-5a9d041ba2f6da468c891ca0fe263758e2c12091.tar.gz lwn-5a9d041ba2f6da468c891ca0fe263758e2c12091.zip |
block: move io_context creation into where it's needed
The only user of the io_context for IO is BFQ, yet we put the checking
and logic of it into the normal IO path.
Put the creation into blk_mq_sched_assign_ioc(), and have BFQ use that
helper.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.c')
-rw-r--r-- | block/bfq-iosched.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index fec18118dc30..1ce1a99a7160 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -6573,6 +6573,8 @@ static struct bfq_queue *bfq_get_bfqq_handle_split(struct bfq_data *bfqd, */ static void bfq_prepare_request(struct request *rq) { + blk_mq_sched_assign_ioc(rq); + /* * Regardless of whether we have an icq attached, we have to * clear the scheduler pointers, as they might point to |