]> www.infradead.org Git - users/hch/block.git/commit
blk-mq: cleanup request allocation
authorChristoph Hellwig <hch@lst.de>
Wed, 24 Nov 2021 06:28:56 +0000 (07:28 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Nov 2021 15:34:23 +0000 (08:34 -0700)
commitf1880d26e517a3fe2fd0c32bcbe05e9230a441cf
tree77816b320aaf01f7373c441d389b626d0be9e680
parentb1d1d48b8b3a90b4eb28fe3222ca57c6266e211c
blk-mq: cleanup request allocation

Refactor the request alloction so that blk_mq_get_cached_request tries
to find a cached request first, and the entirely separate and now
self contained blk_mq_get_new_requests allocates one or more requests
if that is not possible.

There is a small change in behavior as submit_bio_checks is called
twice now if a cached request is present but can't be used, but that
is a small price to pay for unwinding this code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211124062856.1444266-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c