diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-10 09:27:04 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-10 09:27:04 -0400 |
commit | c5739bba5260a59cebd20a51a55080592c8d3b07 (patch) | |
tree | ff33f7acddcfc60e7395209ff949bb9d90afda32 /fs/btrfs/ctree.h | |
parent | 0f7d52f4431c530b4f39c524448c688bb7754de5 (diff) |
Btrfs: snapshot progress
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 5460030c9e6a..2cbcaaeac9e5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -227,7 +227,7 @@ struct btrfs_csum_item { | |||
227 | } __attribute__ ((__packed__)); | 227 | } __attribute__ ((__packed__)); |
228 | 228 | ||
229 | struct btrfs_inode_map_item { | 229 | struct btrfs_inode_map_item { |
230 | struct btrfs_disk_key key; | 230 | u32 refs; |
231 | } __attribute__ ((__packed__)); | 231 | } __attribute__ ((__packed__)); |
232 | 232 | ||
233 | struct crypto_hash; | 233 | struct crypto_hash; |
@@ -883,6 +883,17 @@ static inline void btrfs_set_file_extent_num_blocks(struct | |||
883 | e->num_blocks = cpu_to_le64(val); | 883 | e->num_blocks = cpu_to_le64(val); |
884 | } | 884 | } |
885 | 885 | ||
886 | static inline u32 btrfs_inode_map_refs(struct btrfs_inode_map_item *m) | ||
887 | { | ||
888 | return le32_to_cpu(m->refs); | ||
889 | } | ||
890 | |||
891 | static inline void btrfs_set_inode_map_refs(struct btrfs_inode_map_item *m, | ||
892 | u32 val) | ||
893 | { | ||
894 | m->refs = cpu_to_le32(val); | ||
895 | } | ||
896 | |||
886 | static inline struct btrfs_root *btrfs_sb(struct super_block *sb) | 897 | static inline struct btrfs_root *btrfs_sb(struct super_block *sb) |
887 | { | 898 | { |
888 | return sb->s_fs_info; | 899 | return sb->s_fs_info; |
@@ -925,6 +936,8 @@ static inline void btrfs_mark_buffer_dirty(struct buffer_head *bh) | |||
925 | btrfs_item_offset((leaf)->items + (slot)))) | 936 | btrfs_item_offset((leaf)->items + (slot)))) |
926 | 937 | ||
927 | /* extent-item.c */ | 938 | /* extent-item.c */ |
939 | int btrfs_inc_root_ref(struct btrfs_trans_handle *trans, | ||
940 | struct btrfs_root *root); | ||
928 | struct buffer_head *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, | 941 | struct buffer_head *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, |
929 | struct btrfs_root *root); | 942 | struct btrfs_root *root); |
930 | int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_root | 943 | int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_root |