Commit 6c154ba4 authored by David Sterba's avatar David Sterba

btrfs: tree-checker: add missing stripe checks for raid1c3/4 profiles

The stripe checks for raid1c3/raid1c4 are missing in the sequence in
btrfs_check_chunk_valid.
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0ac6e06b
......@@ -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 &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment