diff options
author | Christoph Hellwig <hch@lst.de> | 2024-01-24 10:26:57 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-02-05 10:05:16 -0700 |
commit | 337e89feb7c29043dacd851b6ac28542a9a8aacf (patch) | |
tree | 78e31cd2cc06866ff9cbe5fa1b251d92b658d686 /block/blk-crypto.c | |
parent | 0f299da55ac3d28bc9de23a84fae01a85c4e253a (diff) | |
download | linux-337e89feb7c29043dacd851b6ac28542a9a8aacf.tar.gz linux-337e89feb7c29043dacd851b6ac28542a9a8aacf.tar.bz2 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-crypto.c')
0 files changed, 0 insertions, 0 deletions