btrfs: add support for inserting raid stripe extents
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Thu, 14 Sep 2023 16:06:58 +0000 (09:06 -0700)
committerDavid Sterba <dsterba@suse.com>
Thu, 12 Oct 2023 14:44:09 +0000 (16:44 +0200)
commit02c372e1f016e5113217597ab37b399c4e407477
tree2d0ae758389fa49c49b19a004ef8cf65fcba2415
parent515020900d447796bc2f0f57064663617a11b65d
btrfs: add support for inserting raid stripe extents

Add support for inserting stripe extents into the raid stripe tree on
completion of every write that needs an extra logical-to-physical
translation when using RAID.

Inserting the stripe extents happens after the data I/O has completed,
this is done to

  a) support zone-append and
  b) rule out the possibility of a RAID-write-hole.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/Makefile
fs/btrfs/bio.c
fs/btrfs/extent-tree.c
fs/btrfs/inode.c
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h
fs/btrfs/raid-stripe-tree.c [new file with mode: 0644]
fs/btrfs/raid-stripe-tree.h [new file with mode: 0644]
fs/btrfs/volumes.c
fs/btrfs/volumes.h