]> www.infradead.org Git - users/hch/block.git/commit
block: allow using the per-cpu bio cache from bio_alloc_bioset
authorMike Snitzer <snitzer@kernel.org>
Thu, 24 Mar 2022 20:35:24 +0000 (16:35 -0400)
committerJens Axboe <axboe@kernel.dk>
Tue, 12 Apr 2022 14:42:42 +0000 (08:42 -0600)
commit5ea81c75d18cf176d096b8e0e94cbd04abcce43a
tree875c324e17e66ba28d598f9a4d1fd794194d3588
parentce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e
block: allow using the per-cpu bio cache from bio_alloc_bioset

Replace the BIO_PERCPU_CACHE bio-internal flag with a REQ_ALLOC_CACHE
one that can be passed to bio_alloc / bio_alloc_bioset, and implement
the percpu cache allocation logic in a helper called from
bio_alloc_bioset.  This allows any bio_alloc_bioset user to use the
percpu caches instead of having the functionality tied to struct kiocb.

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
[hch: refactored a bit]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220324203526.62306-2-snitzer@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
block/blk.h
block/fops.c
include/linux/bio.h
include/linux/blk_types.h