]> 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>
Sun, 8 Nov 2026 23:38:11 +0000 (18:38 -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 bb0ea243e7a53154d996829c489f9415264d6358..5ec42c57150ddaefb35154f803c8338cc13611d0 100644 (file)
@@ -4264,7 +4264,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);
 }
 
 /*