]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: allow-rmw policy, and write-in-place for isolated nocow extents...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 19 Sep 2026 17:17:40 +0000 (13:17 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 8 Nov 2026 23:38:06 +0000 (18:38 -0500)
The hunks of "btrfs: stripe_alloc: allow-rmw policy, and write-in-place
for isolated nocow extents" (earlier in this series) that need code from
"btrfs: add a write-hole invariant checker to the raid56 write path",
which comes after it in this series: they are applied here, once "btrfs:
add a write-hole invariant checker to the raid56 write path" is in,
instead of with the rest of "btrfs: stripe_alloc: allow-rmw policy, and
write-in-place for isolated nocow extents".

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

index a54d100c59eb5dc370dc432b210dc56313684d2b..b16e221c679baf6bc378facfee5f006a09ccd3ec 100644 (file)
@@ -3057,7 +3057,8 @@ void btrfs_stripe_check_write(struct btrfs_fs_info *fs_info,
        if (!bg)
                return;
        if (!btrfs_is_stripe_alloc_bg(bg) ||
-           test_bit(BLOCK_GROUP_FLAG_STRIPE_RELOC_USED, &bg->runtime_flags))
+           test_bit(BLOCK_GROUP_FLAG_STRIPE_RELOC_USED, &bg->runtime_flags) ||
+           test_bit(BLOCK_GROUP_FLAG_STRIPE_NOCOW_USED, &bg->runtime_flags))
                goto out;
        fsl = bg->full_stripe_len;
        spin_lock_irqsave(&bg->stripe_run_lock, flags);