aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-16 10:49:51 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:01 -0400
commit321aecc65671ae8136bd2ca6879b56f0221f8ac8 (patch)
tree9e397c5a6b4750703e60d70c0b588c463aaf376c /fs/btrfs/ctree.h
parente17cade25ff8074101d653557a78df09c16ca276 (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.h7
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
449struct btrfs_block_group_item { 453struct btrfs_block_group_item {
@@ -757,6 +761,7 @@ BTRFS_SETGET_FUNCS(chunk_io_width, struct btrfs_chunk, io_width, 32);
757BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32); 761BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32);
758BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64); 762BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64);
759BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16); 763BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16);
764BTRFS_SETGET_FUNCS(chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16);
760BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64); 765BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64);
761BTRFS_SETGET_FUNCS(stripe_offset, struct btrfs_stripe, offset, 64); 766BTRFS_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,
778BTRFS_SETGET_STACK_FUNCS(stack_chunk_type, struct btrfs_chunk, type, 64); 783BTRFS_SETGET_STACK_FUNCS(stack_chunk_type, struct btrfs_chunk, type, 64);
779BTRFS_SETGET_STACK_FUNCS(stack_chunk_num_stripes, struct btrfs_chunk, 784BTRFS_SETGET_STACK_FUNCS(stack_chunk_num_stripes, struct btrfs_chunk,
780 num_stripes, 16); 785 num_stripes, 16);
786BTRFS_SETGET_STACK_FUNCS(stack_chunk_sub_stripes, struct btrfs_chunk,
787 sub_stripes, 16);
781BTRFS_SETGET_STACK_FUNCS(stack_stripe_devid, struct btrfs_stripe, devid, 64); 788BTRFS_SETGET_STACK_FUNCS(stack_stripe_devid, struct btrfs_stripe, devid, 64);
782BTRFS_SETGET_STACK_FUNCS(stack_stripe_offset, struct btrfs_stripe, offset, 64); 789BTRFS_SETGET_STACK_FUNCS(stack_stripe_offset, struct btrfs_stripe, offset, 64);
783 790