[dm-devel] [PATCH 1/3] block: allow BIOSET_PERCPU_CACHE use from bio_alloc_clone

Christoph Hellwig hch at lst.de
Tue Mar 22 19:54:14 UTC 2022


On Tue, Mar 22, 2022 at 03:49:25PM -0400, Mike Snitzer wrote:
> -	bio = bio_alloc_bioset(bdev, 0, bio_src->bi_opf, gfp, bs);
> +	if (bs->cache && bio_src->bi_opf & REQ_POLLED)
> +		bio = bio_alloc_percpu_cache(bdev, 0, bio_src->bi_opf, gfp, bs);
> +	else

I don't think we can just unconditionally do this based on REQ_POLLED.
We'd either need a flag for bio_alloc_bioset or (probably better)
a separate interface.



More information about the dm-devel mailing list