summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/ctree.h b/ctree.h
index 19e79270..4c752892 100644
--- a/ctree.h
+++ b/ctree.h
@@ -740,6 +740,17 @@ static inline void btrfs_set_super_blocknr(struct btrfs_super_block *s, u64 val)
s->blocknr = cpu_to_le64(val);
}
+static inline u64 btrfs_super_generation(struct btrfs_super_block *s)
+{
+ return le64_to_cpu(s->generation);
+}
+
+static inline void btrfs_set_super_generation(struct btrfs_super_block *s,
+ u64 val)
+{
+ s->generation = cpu_to_le64(val);
+}
+
static inline u64 btrfs_super_root(struct btrfs_super_block *s)
{
return le64_to_cpu(s->root);