From b50836edf9fe531c66310071df59eac2d8dfc708 Mon Sep 17 00:00:00 2001 From: Hans van Kranenburg Date: Thu, 4 Oct 2018 23:24:42 +0200 Subject: btrfs: introduce nparity raid_attr Instead of hardcoding exceptions for RAID5 and RAID6 in the code, use an nparity field in raid_attr. Signed-off-by: Hans van Kranenburg Signed-off-by: David Sterba --- fs/btrfs/volumes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/btrfs/volumes.h') diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index bca18f70650a..40820e0ec5a4 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -331,6 +331,8 @@ struct btrfs_raid_attr { int tolerated_failures; /* max tolerated fail devs */ int devs_increment; /* ndevs has to be a multiple of this */ int ncopies; /* how many copies to data has */ + int nparity; /* number of stripes worth of bytes to store + * parity information */ int mindev_error; /* error code if min devs requisite is unmet */ const char raid_name[8]; /* name of the raid */ u64 bg_flag; /* block group flag of the raid */ -- cgit v1.2.3-59-g8ed1b