Skip to content

btrfs: find_free_extent cleanups

Leo Martins fstests linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesIn review
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

PATCH 1
- re-add full_search
PATCH 2
- standardize naming of skip reasons
- remove preapare_allocation_failure reason as it's not a skip
- add more error_or_values for skip reasons
PATCH 3
- new fstests for raid conversions under stress

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: remove ffe RAID loopfs/btrfs/extent-tree.c+1 -311 reply
2/3btrfs: add tracing for find_free_extent skip conditionsfs/btrfs/extent-tree.c fs/btrfs/extent-tree.h include/trace/events/btrfs.h+118 -31 reply
3/3fstests: btrfs: test RAID conversions under stresstests/btrfs/337 tests/btrfs/337.out+97 -04 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchBoris Burkov
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] btrfs: find_free_extent cleanups

The first patch removes redundant RAID loop logic that became obsolete after previous changes ensured allocations only occur from block groups with matching RAID level.

The second patch adds comprehensive tracing to find_free_extent() to improve debugging and performance analysis capabilities.

Here is a bpftrace script I put together to analyze the allocation behavior, along with output.

Testing:
- ran xfstests btrfs/auto
- verified trace events output correctly
- new fstest that tests RAID conversions under stress

Change log:
v1 -> v2:
PATCH 1
- re-add full_search
PATCH 2
- standardize naming of skip reasons
- remove preapare_allocation_failure reason as it's not a skip
- add more error_or_values for skip reasons
PATCH 3
- new fstests for raid conversions under stress

Leo Martins (2):
btrfs: remove ffe RAID loop
btrfs: add tracing for find_free_extent skip conditions

 fs/btrfs/extent-tree.c       | 70 ++++++++++++++++++------------------
 fs/btrfs/extent-tree.h       | 17 +++++++++
 include/trace/events/btrfs.h | 66 ++++++++++++++++++++++++++++++++++
 3 files changed, 119 insertions(+), 34 deletions(-)
Signature · 1 line
2.47.3