diff options
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 77071f273977..fb6fffb71dd0 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -122,12 +122,12 @@ struct btrfs_super_block { | |||
122 | u8 fsid[16]; /* FS specific uuid */ | 122 | u8 fsid[16]; /* FS specific uuid */ |
123 | __le64 blocknr; /* this block number */ | 123 | __le64 blocknr; /* this block number */ |
124 | __le64 magic; | 124 | __le64 magic; |
125 | __le32 blocksize; | ||
126 | __le64 generation; | 125 | __le64 generation; |
127 | __le64 root; | 126 | __le64 root; |
128 | __le64 total_blocks; | 127 | __le64 total_blocks; |
129 | __le64 blocks_used; | 128 | __le64 blocks_used; |
130 | __le64 root_dir_objectid; | 129 | __le64 root_dir_objectid; |
130 | __le32 blocksize; | ||
131 | } __attribute__ ((__packed__)); | 131 | } __attribute__ ((__packed__)); |
132 | 132 | ||
133 | /* | 133 | /* |
@@ -226,10 +226,12 @@ struct btrfs_root_item { | |||
226 | struct btrfs_inode_item inode; | 226 | struct btrfs_inode_item inode; |
227 | __le64 root_dirid; | 227 | __le64 root_dirid; |
228 | __le64 blocknr; | 228 | __le64 blocknr; |
229 | __le32 flags; | ||
230 | __le64 block_limit; | 229 | __le64 block_limit; |
231 | __le64 blocks_used; | 230 | __le64 blocks_used; |
231 | __le32 flags; | ||
232 | __le32 refs; | 232 | __le32 refs; |
233 | struct btrfs_disk_key drop_progress; | ||
234 | u8 drop_level; | ||
233 | } __attribute__ ((__packed__)); | 235 | } __attribute__ ((__packed__)); |
234 | 236 | ||
235 | #define BTRFS_FILE_EXTENT_REG 0 | 237 | #define BTRFS_FILE_EXTENT_REG 0 |
@@ -800,6 +802,16 @@ static inline void btrfs_set_root_refs(struct btrfs_root_item *item, u32 val) | |||
800 | item->refs = cpu_to_le32(val); | 802 | item->refs = cpu_to_le32(val); |
801 | } | 803 | } |
802 | 804 | ||
805 | static inline u32 btrfs_root_flags(struct btrfs_root_item *item) | ||
806 | { | ||
807 | return le32_to_cpu(item->flags); | ||
808 | } | ||
809 | |||
810 | static inline void btrfs_set_root_flags(struct btrfs_root_item *item, u32 val) | ||
811 | { | ||
812 | item->flags = cpu_to_le32(val); | ||
813 | } | ||
814 | |||
803 | static inline u64 btrfs_super_blocknr(struct btrfs_super_block *s) | 815 | static inline u64 btrfs_super_blocknr(struct btrfs_super_block *s) |
804 | { | 816 | { |
805 | return le64_to_cpu(s->blocknr); | 817 | return le64_to_cpu(s->blocknr); |
@@ -1076,6 +1088,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root | |||
1076 | *item); | 1088 | *item); |
1077 | int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct | 1089 | int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct |
1078 | btrfs_root_item *item, struct btrfs_key *key); | 1090 | btrfs_root_item *item, struct btrfs_key *key); |
1091 | int btrfs_find_dead_roots(struct btrfs_root *root); | ||
1079 | /* dir-item.c */ | 1092 | /* dir-item.c */ |
1080 | int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root | 1093 | int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root |
1081 | *root, const char *name, int name_len, u64 dir, | 1094 | *root, const char *name, int name_len, u64 dir, |