mbox series

[00/14] btrfs: more RST delete fixes

Message ID cover.1733989299.git.jth@kernel.org (mailing list archive)
Headers show
Series btrfs: more RST delete fixes | expand

Message

Johannes Thumshirn Dec. 12, 2024, 7:55 a.m. UTC
Here's another set of fixes for the delete path on RAID stripe-tree backed
filesystems.

Josef's CI system started tripping over a bad key order due to the usage
of btrfs_set_item_key_safe() in btrfs_partially_delete_raid_extent() and
while investigating what is happening there I found more bugs and not
handled corner cases, which resulted in more fixes and test-cases.

Unfortunately I couldn't fix the bad key order problem and had to resort
to re-creating the item in btrfs_partially_delete_raid_extent() and insert
the new one after deleting the old.

Fstests btrfs/06* are extremely good in exhibiting these failures and
btrfs/060 has been extensively run while developing this series.

A full CI run is undergoing at the moment:
https://github.com/btrfs/linux/actions/runs/12291668397

Johannes Thumshirn (14):
  btrfs: don't try to delete RAID stripe-extents if we don't need to
  btrfs: assert RAID stripe-extent length is always greater than 0
  btrfs: fix search when deleting a RAID stripe-extent
  btrfs: fix front delete range calculation for RAID stripe extents
  btrfs: fix tail delete of RAID stripe-extents
  btrfs: fix deletion of a range spanning parts two RAID stripe extents
  btrfs: implement hole punching for RAID stripe extents
  btrfs: don't use btrfs_set_item_key_safe on RAID stripe-extents
  btrfs: selftests: check for correct return value of failed lookup
  btrfs: selftests: don't split RAID extents in half
  btrfs: selftests: test RAID stripe-tree deletion spanning two items
  btrfs: selftests: add selftest for punching holes into the RAID stripe
    extents
  btrfs: selftests: add test for punching a hole into 3 RAID
    stripe-extents
  btrfs: selftests: add a selftest for deleting two out of three extents

 fs/btrfs/ctree.c                        |   1 +
 fs/btrfs/raid-stripe-tree.c             | 154 +++++-
 fs/btrfs/tests/raid-stripe-tree-tests.c | 653 +++++++++++++++++++++++-
 3 files changed, 776 insertions(+), 32 deletions(-)