summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-10 09:27:04 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-10 09:27:04 -0400
commitc5739bba5260a59cebd20a51a55080592c8d3b07 (patch)
treeff33f7acddcfc60e7395209ff949bb9d90afda32 /fs/btrfs/ctree.h
parent0f7d52f4431c530b4f39c524448c688bb7754de5 (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.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 5460030c9e6..2cbcaaeac9e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -227,7 +227,7 @@ struct btrfs_csum_item {
} __attribute__ ((__packed__));
struct btrfs_inode_map_item {
- struct btrfs_disk_key key;
+ u32 refs;
} __attribute__ ((__packed__));
struct crypto_hash;
@@ -883,6 +883,17 @@ static inline void btrfs_set_file_extent_num_blocks(struct
e->num_blocks = cpu_to_le64(val);
}
+static inline u32 btrfs_inode_map_refs(struct btrfs_inode_map_item *m)
+{
+ return le32_to_cpu(m->refs);
+}
+
+static inline void btrfs_set_inode_map_refs(struct btrfs_inode_map_item *m,
+ u32 val)
+{
+ m->refs = cpu_to_le32(val);
+}
+
static inline struct btrfs_root *btrfs_sb(struct super_block *sb)
{
return sb->s_fs_info;
@@ -925,6 +936,8 @@ static inline void btrfs_mark_buffer_dirty(struct buffer_head *bh)
btrfs_item_offset((leaf)->items + (slot))))
/* extent-item.c */
+int btrfs_inc_root_ref(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root);
struct buffer_head *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root);
int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_root