From 4d48b96b280a76f29eb5d5f1578559932f551b2d Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 11 Jul 2009 18:12:37 +0100 Subject: Add basic RAID[56] support David Woodhouse originally contributed this code, and Chris Mason changed it around to reflect the current design goals for raid56. The original code expected all metadata and data writes to be full stripes. This meant metadata block size == stripe size, and had a few other restrictions. This version allows metadata blocks smaller than the stripe size. It implements both raid5 and raid6, although it does not have code to rebuild from parity if one of the drives is missing or incorrect. Signed-off-by: David Woodhouse Signed-off-by: Chris Mason --- cmds-balance.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmds-balance.c') diff --git a/cmds-balance.c b/cmds-balance.c index 38a74269..c5552492 100644 --- a/cmds-balance.c +++ b/cmds-balance.c @@ -47,6 +47,10 @@ static int parse_one_profile(const char *profile, u64 *flags) *flags |= BTRFS_BLOCK_GROUP_RAID1; } else if (!strcmp(profile, "raid10")) { *flags |= BTRFS_BLOCK_GROUP_RAID10; + } else if (!strcmp(profile, "raid5")) { + *flags |= BTRFS_BLOCK_GROUP_RAID5; + } else if (!strcmp(profile, "raid6")) { + *flags |= BTRFS_BLOCK_GROUP_RAID6; } else if (!strcmp(profile, "dup")) { *flags |= BTRFS_BLOCK_GROUP_DUP; } else if (!strcmp(profile, "single")) { -- cgit v1.2.3