summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-21 11:13:29 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-21 11:13:29 -0400
commit8a2c8123c5ee5b09f3b8265e5e6db2e687d29e99 (patch)
tree4e608f93d52d4df45d20e3482ac8acaf02244118 /ctree.h
parentb55672a2a1694d27b73f8233efcc1d986bfc797a (diff)
create a root dir in mkfs
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ctree.h b/ctree.h
index 1a4d1d6f..c9361d83 100644
--- a/ctree.h
+++ b/ctree.h
@@ -75,6 +75,7 @@ struct btrfs_super_block {
__le64 root;
__le64 total_blocks;
__le64 blocks_used;
+ __le64 root_dir_objectid;
} __attribute__ ((__packed__));
/*
@@ -693,6 +694,17 @@ static inline void btrfs_set_super_blocksize(struct btrfs_super_block *s,
s->blocksize = cpu_to_le32(val);
}
+static inline u64 btrfs_super_root_dir(struct btrfs_super_block *s)
+{
+ return le64_to_cpu(s->root_dir_objectid);
+}
+
+static inline void btrfs_set_super_root_dir(struct btrfs_super_block *s, u64
+ val)
+{
+ s->root_dir_objectid = cpu_to_le64(val);
+}
+
static inline u8 *btrfs_leaf_data(struct btrfs_leaf *l)
{
return (u8 *)l->items;