]> git.baikalelectronics.ru Git - kernel.git/commit
block: move queue enter logic into blk_mq_submit_bio()
authorJens Axboe <axboe@kernel.dk>
Wed, 3 Nov 2021 11:47:09 +0000 (05:47 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Nov 2021 05:20:10 +0000 (23:20 -0600)
commite1ffe3b84c23c2b2da6b79bec92046ebd1221807
tree0429d43fed6fcb41ab394987d423bc08a042e730
parentf72c09b73c9978fb7c393ef661069bb5f5c711f8
block: move queue enter logic into blk_mq_submit_bio()

Retain the old logic for the fops based submit, but for our internal
blk_mq_submit_bio(), move the queue entering logic into the core
function itself.

We need to be a bit careful if going into the scheduler, as a scheduler
or queue mappings can arbitrarily change before we have entered the queue.
Have the bio scheduler mapping do that separately, it's a very cheap
operation compared to actually doing merging locking and lookups.

Reviewed-by: Christoph Hellwig <hch@lst.de>
[axboe: update to check merge post submit_bio_checks() doing remap...]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-mq-sched.c
block/blk-mq.c
block/blk.h