]> git.hungrycats.org Git - linux/commit
btrfs: stripe_meta: sync the open-run remainder when the commit retires metadata...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Wed, 16 Sep 2026 05:20:32 +0000 (01:20 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 18 Sep 2026 21:36:30 +0000 (17:36 -0400)
commite8918f2628854b827ba1ad911a29a6c7ff1a3949
treec65ed8542a0e7efe341eeb428b8d0040a18f6441
parent0284e69e752ce05330cc5d859b106e9d26e5e0a2
btrfs: stripe_meta: sync the open-run remainder when the commit retires metadata runs

btrfs_retire_meta_stripes() closes the committing transaction's metadata
runs and returns their tails, which shrinks the group's open-run
remainder, but never folded that delta into the space_info's
bytes_stripe_open: the next allocation from the group carried it, so
the counter only lagged by a commit while the policy was on.  After a
runtime disable nothing allocates from the group again and the
remainder of the runs the last commit retired stayed counted as used
metadata for the life of the mount (147456 bytes in
stripe-meta-toggle-test.sh, after the disable had already zeroed the
group's trapped and claimable bytes).

Sync after the closes, as the data-side retirement does.

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