summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-11-30 11:30:24 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-11-30 11:30:24 -0500
commit1883251686b1de012e909c4459deceff1f95a96c (patch)
tree4434ca0e314fa0d117b1833fcd5f5cdf347c49e2 /ctree.h
parente3815ddde6e8ffdc7bec54a04611cfc243862372 (diff)
Add simple stripe size parameter
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ctree.h b/ctree.h
index 2f55b15e..fb972c1d 100644
--- a/ctree.h
+++ b/ctree.h
@@ -122,6 +122,7 @@ struct btrfs_super_block {
__le32 sectorsize;
__le32 nodesize;
__le32 leafsize;
+ __le32 stripesize;
u8 root_level;
} __attribute__ ((__packed__));
@@ -324,6 +325,9 @@ struct btrfs_root {
/* leaf allocations are done in leafsize units */
u32 leafsize;
+ /* leaf allocations are done in leafsize units */
+ u32 stripesize;
+
int ref_cows;
u32 type;
};
@@ -903,6 +907,17 @@ static inline void btrfs_set_super_leafsize(struct btrfs_super_block *s,
s->leafsize = cpu_to_le32(val);
}
+static inline u32 btrfs_super_stripesize(struct btrfs_super_block *s)
+{
+ return le32_to_cpu(s->stripesize);
+}
+
+static inline void btrfs_set_super_stripesize(struct btrfs_super_block *s,
+ u32 val)
+{
+ s->stripesize = cpu_to_le32(val);
+}
+
static inline u64 btrfs_super_root_dir(struct btrfs_super_block *s)
{
return le64_to_cpu(s->root_dir_objectid);