aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/block/blk.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-01-24 10:26:57 +0100
committerJens Axboe <axboe@kernel.dk>2024-02-05 10:05:16 -0700
commit337e89feb7c29043dacd851b6ac28542a9a8aacf (patch)
tree78e31cd2cc06866ff9cbe5fa1b251d92b658d686 /block/blk.h
parentblk-mq: move blk_mq_attempt_bio_merge out blk_mq_get_new_requests (diff)
downloadwireguard-linux-337e89feb7c29043dacd851b6ac28542a9a8aacf.tar.xz
wireguard-linux-337e89feb7c29043dacd851b6ac28542a9a8aacf.zip
blk-mq: introduce a blk_mq_peek_cached_request helper
Add a new helper to check if there is suitable cached request in blk_mq_submit_bio. This removes open coded logic in blk_mq_submit_bio and moves some checks that so far are in blk_mq_use_cached_rq to be performed earlier. This avoids the case where we first do check with the cached request but then later end up allocating a new one anyway and need to grab a queue reference. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Tested-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20240124092658.2258309-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
0 files changed, 0 insertions, 0 deletions