[PATCHv5 1/2] block: accumulate memory segment gaps per bio

Keith Busch kbusch at kernel.org
Mon Aug 17 09:05:00 PDT 2026


On Mon, Aug 17, 2026 at 05:12:39PM +0200, Eric Auger wrote:
> Please let me know if you want me to trace some stuff specifically.

Can you test the same setup with this included?

---
diff --git a/block/bio.c b/block/bio.c
index 4074a0496b93f..c343788e1f96e 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -859,6 +859,7 @@ static int __bio_clone(struct bio *bio, struct bio *bio_src, gfp_t gfp)
 	bio->bi_ioprio = bio_src->bi_ioprio;
 	bio->bi_write_hint = bio_src->bi_write_hint;
 	bio->bi_write_stream = bio_src->bi_write_stream;
+	bio->bi_bvec_gap_bit = bio_src->bi_bvec_gap_bit;
 	bio->bi_iter = bio_src->bi_iter;
 
 	if (bio->bi_bdev) {
@@ -1969,6 +1970,7 @@ struct bio *bio_split(struct bio *bio, int sectors,
 		bio_integrity_trim(split);
 
 	bio_advance(bio, split->bi_iter.bi_size);
+	bio->bi_bvec_gap_bit = 0;
 
 	if (bio_flagged(bio, BIO_TRACE_COMPLETION))
 		bio_set_flag(split, BIO_TRACE_COMPLETION);
--



More information about the Linux-nvme mailing list