summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorYan <yanzheng@21cn.com>2008-01-04 10:41:19 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-01-04 10:41:19 -0500
commit84b99666be01205ffea5cb2740c7b6a917cb38a1 (patch)
tree8557004fd11b3e15e98f315d44292b8c529c740b /ctree.h
parent7777e63b425f1444d2472ea05a6b2b9cf865f35b (diff)
Update find_free_extent for the ext3 conversion tool
This patch adds customized find_free_extent support to btrfs-progs, the conversion program requires this.
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ctree.h b/ctree.h
index 32b91906..1de24290 100644
--- a/ctree.h
+++ b/ctree.h
@@ -298,6 +298,12 @@ struct btrfs_block_group_cache {
int cached;
u64 pinned;
};
+struct btrfs_extent_ops {
+ int (*alloc_extent)(struct btrfs_root *root, u64 num_bytes,
+ u64 hint_byte, struct btrfs_key *ins);
+ int (*free_extent)(struct btrfs_root *root, u64 bytenr,
+ u64 num_bytes);
+};
struct btrfs_fs_info {
u8 fsid[BTRFS_FSID_SIZE];
@@ -322,8 +328,10 @@ struct btrfs_fs_info {
struct mutex fs_mutex;
int fp;
u64 total_pinned;
-};
+ struct btrfs_extent_ops *extent_ops;
+ void *priv_data;
+};
/*
* in ram representation of the tree. extent_root is used for all allocations
* and for the extent tree extent_root root.