]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
btrfs: fix ncopies raid_attr for RAID56
authorHans van Kranenburg <hans.van.kranenburg@mendix.com>
Thu, 4 Oct 2018 21:24:41 +0000 (23:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:20:21 +0000 (09:20 +0100)
[ Upstream commit da612e31aee51bd13231c78a47c714b543bd3ad8 ]

RAID5 and RAID6 profile store one copy of the data, not 2 or 3. These
values are not yet used anywhere so there's no change.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/volumes.c

index f84c18e86c816dcab14b9891bad7033b2eef9743..5bbcdcff68a9eb26c9e016bb3de2f75856d1d858 100644 (file)
@@ -96,7 +96,7 @@ const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = {
                .devs_min       = 2,
                .tolerated_failures = 1,
                .devs_increment = 1,
-               .ncopies        = 2,
+               .ncopies        = 1,
                .raid_name      = "raid5",
                .bg_flag        = BTRFS_BLOCK_GROUP_RAID5,
                .mindev_error   = BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET,
@@ -108,7 +108,7 @@ const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = {
                .devs_min       = 3,
                .tolerated_failures = 2,
                .devs_increment = 1,
-               .ncopies        = 3,
+               .ncopies        = 1,
                .raid_name      = "raid6",
                .bg_flag        = BTRFS_BLOCK_GROUP_RAID6,
                .mindev_error   = BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET,