btrfs: tree-checker: add missing stripe checks for raid1c3/4 profiles
authorDavid Sterba <dsterba@suse.com>
Mon, 26 Jul 2021 12:15:17 +0000 (14:15 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:03 +0000 (13:19 +0200)
The stripe checks for raid1c3/raid1c4 are missing in the sequence in
btrfs_check_chunk_valid.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-checker.c

index ac9416c..7ba94b6 100644 (file)
@@ -877,6 +877,10 @@ int btrfs_check_chunk_valid(struct extent_buffer *leaf,
                      sub_stripes != btrfs_raid_array[BTRFS_RAID_RAID10].sub_stripes) ||
                     (type & BTRFS_BLOCK_GROUP_RAID1 &&
                      num_stripes != btrfs_raid_array[BTRFS_RAID_RAID1].devs_min) ||
+                    (type & BTRFS_BLOCK_GROUP_RAID1C3 &&
+                     num_stripes != btrfs_raid_array[BTRFS_RAID_RAID1C3].devs_min) ||
+                    (type & BTRFS_BLOCK_GROUP_RAID1C4 &&
+                     num_stripes != btrfs_raid_array[BTRFS_RAID_RAID1C4].devs_min) ||
                     (type & BTRFS_BLOCK_GROUP_RAID5 &&
                      num_stripes < btrfs_raid_array[BTRFS_RAID_RAID5].devs_min) ||
                     (type & BTRFS_BLOCK_GROUP_RAID6 &&