aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 1a4d1d6fa401..ae8518cb94bf 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1,9 +1,6 @@
1#ifndef __BTRFS__ 1#ifndef __BTRFS__
2#define __BTRFS__ 2#define __BTRFS__
3 3
4#include "list.h"
5#include "kerncompat.h"
6
7struct btrfs_trans_handle; 4struct btrfs_trans_handle;
8 5
9#define BTRFS_MAGIC "_BtRfS_M" 6#define BTRFS_MAGIC "_BtRfS_M"
@@ -75,6 +72,7 @@ struct btrfs_super_block {
75 __le64 root; 72 __le64 root;
76 __le64 total_blocks; 73 __le64 total_blocks;
77 __le64 blocks_used; 74 __le64 blocks_used;
75 __le64 root_dir_objectid;
78} __attribute__ ((__packed__)); 76} __attribute__ ((__packed__));
79 77
80/* 78/*
@@ -693,6 +691,17 @@ static inline void btrfs_set_super_blocksize(struct btrfs_super_block *s,
693 s->blocksize = cpu_to_le32(val); 691 s->blocksize = cpu_to_le32(val);
694} 692}
695 693
694static inline u64 btrfs_super_root_dir(struct btrfs_super_block *s)
695{
696 return le64_to_cpu(s->root_dir_objectid);
697}
698
699static inline void btrfs_set_super_root_dir(struct btrfs_super_block *s, u64
700 val)
701{
702 s->root_dir_objectid = cpu_to_le64(val);
703}
704
696static inline u8 *btrfs_leaf_data(struct btrfs_leaf *l) 705static inline u8 *btrfs_leaf_data(struct btrfs_leaf *l)
697{ 706{
698 return (u8 *)l->items; 707 return (u8 *)l->items;