diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-16 10:49:51 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:01 -0400 |
commit | 321aecc65671ae8136bd2ca6879b56f0221f8ac8 (patch) | |
tree | 9e397c5a6b4750703e60d70c0b588c463aaf376c /fs/btrfs/ctree.h | |
parent | e17cade25ff8074101d653557a78df09c16ca276 (diff) |
Btrfs: Add RAID10 support
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 82d67c3db8bc..a22edcf49174 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -197,6 +197,9 @@ struct btrfs_chunk { | |||
197 | * item in the btree | 197 | * item in the btree |
198 | */ | 198 | */ |
199 | __le16 num_stripes; | 199 | __le16 num_stripes; |
200 | |||
201 | /* sub stripes only matter for raid10 */ | ||
202 | __le16 sub_stripes; | ||
200 | struct btrfs_stripe stripe; | 203 | struct btrfs_stripe stripe; |
201 | /* additional stripes go here */ | 204 | /* additional stripes go here */ |
202 | } __attribute__ ((__packed__)); | 205 | } __attribute__ ((__packed__)); |
@@ -444,6 +447,7 @@ struct btrfs_csum_item { | |||
444 | #define BTRFS_BLOCK_GROUP_RAID0 (1 << 3) | 447 | #define BTRFS_BLOCK_GROUP_RAID0 (1 << 3) |
445 | #define BTRFS_BLOCK_GROUP_RAID1 (1 << 4) | 448 | #define BTRFS_BLOCK_GROUP_RAID1 (1 << 4) |
446 | #define BTRFS_BLOCK_GROUP_DUP (1 << 5) | 449 | #define BTRFS_BLOCK_GROUP_DUP (1 << 5) |
450 | #define BTRFS_BLOCK_GROUP_RAID10 (1 << 6) | ||
447 | 451 | ||
448 | 452 | ||
449 | struct btrfs_block_group_item { | 453 | struct btrfs_block_group_item { |
@@ -757,6 +761,7 @@ BTRFS_SETGET_FUNCS(chunk_io_width, struct btrfs_chunk, io_width, 32); | |||
757 | BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32); | 761 | BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32); |
758 | BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64); | 762 | BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64); |
759 | BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16); | 763 | BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16); |
764 | BTRFS_SETGET_FUNCS(chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16); | ||
760 | BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64); | 765 | BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64); |
761 | BTRFS_SETGET_FUNCS(stripe_offset, struct btrfs_stripe, offset, 64); | 766 | BTRFS_SETGET_FUNCS(stripe_offset, struct btrfs_stripe, offset, 64); |
762 | 767 | ||
@@ -778,6 +783,8 @@ BTRFS_SETGET_STACK_FUNCS(stack_chunk_sector_size, struct btrfs_chunk, | |||
778 | BTRFS_SETGET_STACK_FUNCS(stack_chunk_type, struct btrfs_chunk, type, 64); | 783 | BTRFS_SETGET_STACK_FUNCS(stack_chunk_type, struct btrfs_chunk, type, 64); |
779 | BTRFS_SETGET_STACK_FUNCS(stack_chunk_num_stripes, struct btrfs_chunk, | 784 | BTRFS_SETGET_STACK_FUNCS(stack_chunk_num_stripes, struct btrfs_chunk, |
780 | num_stripes, 16); | 785 | num_stripes, 16); |
786 | BTRFS_SETGET_STACK_FUNCS(stack_chunk_sub_stripes, struct btrfs_chunk, | ||
787 | sub_stripes, 16); | ||
781 | BTRFS_SETGET_STACK_FUNCS(stack_stripe_devid, struct btrfs_stripe, devid, 64); | 788 | BTRFS_SETGET_STACK_FUNCS(stack_stripe_devid, struct btrfs_stripe, devid, 64); |
782 | BTRFS_SETGET_STACK_FUNCS(stack_stripe_offset, struct btrfs_stripe, offset, 64); | 789 | BTRFS_SETGET_STACK_FUNCS(stack_stripe_offset, struct btrfs_stripe, offset, 64); |
783 | 790 | ||