From: Leo Martins <loemra.dev@gmail.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com, fstests@vger.kernel.org
Subject: [PATCH v2 0/3] btrfs: find_free_extent cleanups
Date: Fri, 3 Oct 2025 16:41:56 -0700 [thread overview]
Message-ID: <cover.1759532729.git.loemra.dev@gmail.com> (raw)
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.
Link: https://github.com/loemraw/btrfs-scripts/blob/main/ffe_analyzer.bt
Link: https://github.com/loemraw/btrfs-scripts/blob/main/ffe_analyzer.out
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(-)
--
2.47.3
next reply other threads:[~2025-10-03 23:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 23:41 Leo Martins [this message]
2025-10-03 23:41 ` [PATCH v2 1/3] btrfs: remove ffe RAID loop Leo Martins
2025-10-15 3:29 ` Boris Burkov
2025-10-03 23:41 ` [PATCH v2 2/3] btrfs: add tracing for find_free_extent skip conditions Leo Martins
2025-10-15 3:28 ` Boris Burkov
2025-10-03 23:41 ` [PATCH v2 3/3] fstests: btrfs: test RAID conversions under stress Leo Martins
2025-10-04 1:54 ` Qu Wenruo
2025-10-06 17:37 ` Leo Martins
2025-10-06 18:16 ` David Sterba
2025-10-15 3:31 ` Boris Burkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1759532729.git.loemra.dev@gmail.com \
--to=loemra.dev@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).