block: enable batched allocation for blk_mq_alloc_request()
authorJens Axboe <axboe@kernel.dk>
Wed, 21 Sep 2022 14:22:09 +0000 (08:22 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 30 Sep 2022 13:48:00 +0000 (07:48 -0600)
commit4b6a5d9cea911424e84107df8c4eb8317938d2cd
treee62e8091470a63c018855e263bd10be2ee353c67
parente73a625bc24880f1fe5abaa89bb63e0918fbd66c
block: enable batched allocation for blk_mq_alloc_request()

The filesystem IO path can take advantage of allocating batches of
requests, if the underlying submitter tells the block layer about it
through the blk_plug. For passthrough IO, the exported API is the
blk_mq_alloc_request() helper, and that one does not allow for
request caching.

Wire up request caching for blk_mq_alloc_request(), which is generally
done without having a bio available upfront.

Tested-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c