]> git.hungrycats.org Git - linux/commit
block: save page offset gaps in cloned bio
authorKeith Busch <kbusch@kernel.org>
Wed, 19 Aug 2026 15:49:37 +0000 (08:49 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Sep 2026 14:42:34 +0000 (08:42 -0600)
commit96c8ea3c5add7920b3c43840d1ea76b3354c8d2d
treee2a8fa5c8d49452330047fd9b25ae67389912814
parent3f9c7a108c0e8f14425384912017071b71341e3b
block: save page offset gaps in cloned bio

The cloned bio needs to inherit the accumulated gaps between vectors so
that we can know if this bio can subscribe to the iova coalescing
optimization.

When cloning for a split, the gap only applies to the front bio since
that's as far as has been processed. The remaining bio can reset its
gaps to 0 since it advanced past the checked vectors, and will start its
accounting from there on the next split check.

Fixes: 2f6b2565d43c ("block: accumulate memory segment gaps per bio")
Reported-by: Eric Auger <eauger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260819154937.3903312-1-kbusch@meta.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c