diff options
author | Hans van Kranenburg <hans.van.kranenburg@mendix.com> | 2018-10-04 23:24:42 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 14:51:34 +0100 |
commit | b50836edf9fe531c66310071df59eac2d8dfc708 (patch) | |
tree | 0556f2f5d3b7ebc9e43831297cf4a1472b0158af /fs/btrfs/volumes.h | |
parent | btrfs: fix ncopies raid_attr for RAID56 (diff) | |
download | linux-b50836edf9fe531c66310071df59eac2d8dfc708.tar.xz linux-b50836edf9fe531c66310071df59eac2d8dfc708.zip |
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 <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 */ |