mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
btrfs: add support for 4-copy replication (raid1c4)
Add new block group profile to store 4 copies in a simliar way that current RAID1 does. The profile attributes and constraints are defined in the raid table and used by the same code that already handles the 2- and 3-copy RAID1. The minimum number of devices is 4, the maximum number of devices/chunks that can be lost/damaged is 3. There is no comparable traditional RAID level, the profile is added for future needs to accompany triple-parity and beyond. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
47e6f7423b
commit
8d6fac0087
6 changed files with 24 additions and 3 deletions
|
@ -1937,6 +1937,8 @@ static inline int btrfs_calc_avail_data_space(struct btrfs_fs_info *fs_info,
|
|||
num_stripes = 2;
|
||||
else if (type & BTRFS_BLOCK_GROUP_RAID1C3)
|
||||
num_stripes = 3;
|
||||
else if (type & BTRFS_BLOCK_GROUP_RAID1C4)
|
||||
num_stripes = 4;
|
||||
else if (type & BTRFS_BLOCK_GROUP_RAID10)
|
||||
num_stripes = 4;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue