Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

btrfs: fix wrong min_objectid in btrfs_previous_item() call

When found_start > start and slot == 0, btrfs_previous_item() is called
with min_objectid=start to find the previous stripe extent. However, the
previous stripe extent we are looking for has objectid < start (it starts
before our deletion range), so passing start as min_objectid prevents
finding it.

Fix by passing 0 as min_objectid to allow finding any preceding stripe
extent regardless of its objectid.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: robbieko <robbieko@synology.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

robbieko and committed by
David Sterba
1871ae78 2aef5cb1

+1 -1
+1 -1
fs/btrfs/raid-stripe-tree.c
··· 138 138 */ 139 139 if (found_start > start) { 140 140 if (slot == 0) { 141 - ret = btrfs_previous_item(stripe_root, path, start, 141 + ret = btrfs_previous_item(stripe_root, path, 0, 142 142 BTRFS_RAID_STRIPE_KEY); 143 143 if (ret) { 144 144 if (ret > 0)