]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: count open stripe run remainders against data reservations ...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 19 Sep 2026 17:17:45 +0000 (13:17 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 8 Nov 2026 23:38:02 +0000 (18:38 -0500)
The hunks of "btrfs: stripe_alloc: count open stripe run remainders
against data reservations" (earlier in this series) that need code from
"btrfs: stripe_alloc: settle a logged extent's stripes at log commit",
which comes after it in this series: they are applied here, once "btrfs:
stripe_alloc: settle a logged extent's stripes at log commit" is in,
instead of with the rest of "btrfs: stripe_alloc: count open stripe run
remainders against data reservations".

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

index d496f763cedb817c544d09eb32b6651ebac1832a..54e2540a74fe66f18227f91e234786b5df7ee6a6 100644 (file)
@@ -1918,8 +1918,10 @@ void btrfs_log_settle_stripes(struct btrfs_fs_info *fs_info, u64 bytenr,
        }
        spin_unlock_irqrestore(&bg->stripe_run_lock, flags);
 
-       if (tail_len)
+       if (tail_len) {
                btrfs_add_free_space(bg, tail_start, tail_len);
+               stripe_open_remainder_sync(bg);
+       }
        if (flush_len) {
                btrfs_flush_parked_rbios(fs_info, flush_start, flush_len, false);
                wait_var_event(&bg->open_stripe_runs,