]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: keep a stripe in the rbio cache until its run has written all...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Thu, 1 Oct 2026 16:14:49 +0000 (12:14 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 8 Nov 2026 23:37:55 +0000 (18:37 -0500)
The hunks of "btrfs: stripe_alloc: keep a stripe in the rbio cache until
its run has written all of it" (earlier in this series) that need code
from "btrfs: stripe_alloc: isolate nodatacow and preallocated extents by
stripe", which comes after it in this series: they are applied here,
once "btrfs: stripe_alloc: isolate nodatacow and preallocated extents by
stripe" is in, instead of with the rest of "btrfs: stripe_alloc: keep a
stripe in the rbio cache until its run has written all of it".

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

index ff05bdf91d8f8b34dd67c8e5b4812f75153f7a60..07536d49a07dd836d9ffd297c5a1af52d27e9498 100644 (file)
@@ -1502,6 +1502,8 @@ static bool run_written_range(const struct btrfs_open_stripe_run *run,
        const u32 bits = run->bg->fs_info->sectorsize_bits;
        u64 lo, hi;
 
+       if (run->class == BTRFS_STRIPE_RUN_NOCOW)
+               return false;
        if (!run->live || !run->written || !run->live_nbits)
                return false;
        lo = max(*start, run->start);