Skip to content

Commit

Permalink
btrfs: fix tail delete of RAID stripe-extents
Browse files Browse the repository at this point in the history
Fix tail delete of RAID stripe-extents, if there is a range to be deleted
as well after the tail delete of the extent.

Signed-off-by: Johannes Thumshirn <[email protected]>
  • Loading branch information
morbidrsa committed Dec 4, 2024
1 parent 486d8da commit b23178a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fs/btrfs/raid-stripe-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,14 @@ int btrfs_delete_raid_extent(struct btrfs_trans_handle *trans, u64 start, u64 le

btrfs_partially_delete_raid_extent(trans, path, &key,
diff, 0);
break;

start += diff;
length -= diff;
if (length == 0)
break;

btrfs_release_path(path);
continue;
}

/*
Expand Down

0 comments on commit b23178a

Please sign in to comment.