]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: simplify bvec iteration in index_one_bio()
authorChristoph Hellwig <hch@lst.de>
Wed, 9 Apr 2025 11:10:39 +0000 (13:10 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:46 +0000 (14:30 +0200)
commit6f3f722df7254b7e652e042a93f7e2b011223af0
treedd18696a2b439c2048b13d258351ba67ace722b0
parent959ddf28390bae9019f0681ea8a239181be1c0f9
btrfs: simplify bvec iteration in index_one_bio()

Flatten the two loops by open coding bio_for_each_segment() and advancing
the iterator one sector at a time.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Qu Wenruo <wqu@suse.com>
[ Fix a bug that @offset is not increased. ]
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c