]> 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>
Wed, 16 Sep 2026 21:40:07 +0000 (17:40 -0400)
commit8d8f846ba367473166d9984f27d5f25a3871eb7c
treee4f40fae6279b657c2d8014a0a8b2e61ef686b35
parent2e44ad8a4a91e2683f9e20ee2deb5aebdb817c54
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