From 900e080752025f0016128f07c9ed4c50eba3654b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 3 Nov 2021 05:47:09 -0600 Subject: 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 [axboe: update to check merge post submit_bio_checks() doing remap...] Signed-off-by: Jens Axboe --- block/blk.h | 1 + 1 file changed, 1 insertion(+) (limited to 'block/blk.h') diff --git a/block/blk.h b/block/blk.h index 814d9632d43e..b4fed2033e48 100644 --- a/block/blk.h +++ b/block/blk.h @@ -56,6 +56,7 @@ void blk_freeze_queue(struct request_queue *q); void __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic); void blk_queue_start_drain(struct request_queue *q); int __bio_queue_enter(struct request_queue *q, struct bio *bio); +bool submit_bio_checks(struct bio *bio); static inline bool blk_try_enter_queue(struct request_queue *q, bool pm) { -- cgit v1.2.3