btrfs: update stripe extents for existing logical addresses
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Mon, 8 Jul 2024 11:24:08 +0000 (13:24 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 10 Sep 2024 14:51:12 +0000 (16:51 +0200)
commit8c4cba2adbb0ec63f3833cad7452a431580e9ffa
tree72a9965f05e7ff0e4f88348b9b131f51bb429fb0
parentda3ea35007d0af457a0afc87e84fddaebc4e0b63
btrfs: update stripe extents for existing logical addresses

Update a stripe extent in case of an already existing logical address,
but with different physical addresses and/or device id instead of
bailing out with EEXIST.

This can happen i.e. in case of a device replace operation, where data
extents get rewritten to a new disk.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid-stripe-tree.c