diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-11 18:12:37 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-02-01 14:22:07 -0500 |
commit | 4d48b96b280a76f29eb5d5f1578559932f551b2d (patch) | |
tree | c67db59d335759896fcb3c05d54f1a3232dd6471 /ctree.h | |
parent | 6f082141d0a608c286c3f1b42ddd558e72ea1d9f (diff) |
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 <David.Woodhouse@intel.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'ctree.h')
-rw-r--r-- | ctree.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -437,6 +437,7 @@ struct btrfs_super_block { * code was pretty buggy. Lets not let them try anymore. */ #define BTRFS_FEATURE_INCOMPAT_BIG_METADATA (1ULL << 5) +#define BTRFS_FEATURE_INCOMPAT_RAID56 (1ULL << 7) #define BTRFS_FEATURE_COMPAT_SUPP 0ULL @@ -446,6 +447,7 @@ struct btrfs_super_block { BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL | \ BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO | \ BTRFS_FEATURE_INCOMPAT_BIG_METADATA | \ + BTRFS_FEATURE_INCOMPAT_RAID56 | \ BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS) /* @@ -779,6 +781,8 @@ struct btrfs_csum_item { #define BTRFS_BLOCK_GROUP_RAID1 (1ULL << 4) #define BTRFS_BLOCK_GROUP_DUP (1ULL << 5) #define BTRFS_BLOCK_GROUP_RAID10 (1ULL << 6) +#define BTRFS_BLOCK_GROUP_RAID5 (1ULL << 7) +#define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8) #define BTRFS_BLOCK_GROUP_RESERVED BTRFS_AVAIL_ALLOC_BIT_SINGLE /* used in struct btrfs_balance_args fields */ |