]> git.baikalelectronics.ru Git - kernel.git/commit
block: allow use of per-cpu bio alloc cache by block drivers
authorMike Snitzer <snitzer@kernel.org>
Thu, 24 Mar 2022 20:35:25 +0000 (16:35 -0400)
committerJens Axboe <axboe@kernel.dk>
Sun, 17 Apr 2022 22:49:40 +0000 (16:49 -0600)
commit5d18de96990835113e852ea0fbb0fe54834155cc
tree0178a6d8ffcda464a458ae3f6ba7a21b337c01f2
parentb06e838c2169babd3b756054eb60a6c317e25d77
block: allow use of per-cpu bio alloc cache by block drivers

Refine per-cpu bio alloc cache interfaces so that DM and other block
drivers can properly create and use the cache:

DM uses bioset_init_from_src() to do its final bioset initialization,
so must update bioset_init_from_src() to set BIOSET_PERCPU_CACHE if
%src bioset has a cache.

Also move bio_clear_polled() to include/linux/bio.h to allow users
outside of block core.

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220324203526.62306-3-snitzer@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
block/blk.h
include/linux/bio.h