]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: skip RAID5/6 groups that are mapped as RAID1/RAID1C3 (stripe_met...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 10 Oct 2026 04:19:18 +0000 (00:19 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 2 Nov 2026 02:16:31 +0000 (21:16 -0500)
The hunks of "btrfs: stripe_alloc: skip RAID5/6 groups that are mapped
as RAID1/RAID1C3" (earlier in this series) that need code from "btrfs:
stripe_meta: allocate tree blocks by whole stripes", which comes after
it in this series: they are applied here, once "btrfs: stripe_meta:
allocate tree blocks by whole stripes" is in, instead of with the rest
of "btrfs: stripe_alloc: skip RAID5/6 groups that are mapped as
RAID1/RAID1C3".

Assisted-by: Claude:claude-opus-5-5
fs/btrfs/extent-tree.c

index 25a339856b07e69f12e70622972d49eb044c575a..8fce8a55682221bcf5944b9be566c2553c0aa8b0 100644 (file)
@@ -4260,7 +4260,8 @@ bool btrfs_is_stripe_meta_bg(const struct btrfs_block_group *bg)
        return btrfs_test_opt(bg->fs_info, STRIPE_ALLOC) &&
               (bg->flags & BTRFS_BLOCK_GROUP_METADATA) &&
               !(bg->flags & BTRFS_BLOCK_GROUP_DATA) &&
-              (bg->flags & BTRFS_BLOCK_GROUP_RAID56_MASK);
+              (bg->flags & BTRFS_BLOCK_GROUP_RAID56_MASK) &&
+              !test_bit(BLOCK_GROUP_FLAG_RAID56_MIRRORED, &bg->runtime_flags);
 }
 
 /*