]> git.hungrycats.org Git - linux/commit
btrfs: stripe_alloc: relocate a queued stripe group even while it has reserved or...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 6 Sep 2026 05:14:31 +0000 (01:14 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Wed, 16 Sep 2026 21:40:05 +0000 (17:40 -0400)
commited2cb3bd4bddb184b329ffaffe2cb222407eb5c5
tree3209aad594109abd37b777aa11764e0d305416d9
parent8e4e954bce1290a384ca2ed371d96afe940c5db7
btrfs: stripe_alloc: relocate a queued stripe group even while it has reserved or pinned bytes

The reclaim worker defers any group that has bytes reserved or pinned,
on the theory that it was queued for falling below the used threshold
and may be about to go empty on its own.  A stripe_alloc or stripe_meta
group is queued for the opposite reason -- free space trapped in
partially used stripes, which no amount of waiting frees -- and under
COW churn a metadata group has blocks reserved or pinned at every
moment, so the worker skipped every one of seven queued metadata
groups for the whole of a fill-to-the-edge test and relocated none.
Relocation already waits for in-flight allocations and writers on its
own; take the group.

Assisted-by: Claude:claude-fable-5
fs/btrfs/block-group.c