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.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 7d2479694a58..e0aa9fb563e2 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -34,6 +34,7 @@
34 34
35struct btrfs_trans_handle; 35struct btrfs_trans_handle;
36struct btrfs_transaction; 36struct btrfs_transaction;
37struct btrfs_pending_snapshot;
37extern struct kmem_cache *btrfs_trans_handle_cachep; 38extern struct kmem_cache *btrfs_trans_handle_cachep;
38extern struct kmem_cache *btrfs_transaction_cachep; 39extern struct kmem_cache *btrfs_transaction_cachep;
39extern struct kmem_cache *btrfs_bit_radix_cachep; 40extern struct kmem_cache *btrfs_bit_radix_cachep;
@@ -970,6 +971,7 @@ struct btrfs_fs_info {
970 int do_barriers; 971 int do_barriers;
971 int closing; 972 int closing;
972 int log_root_recovering; 973 int log_root_recovering;
974 int enospc_unlink;
973 975
974 u64 total_pinned; 976 u64 total_pinned;
975 977
@@ -1995,6 +1997,9 @@ void btrfs_put_block_group(struct btrfs_block_group_cache *cache);
1995int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, 1997int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
1996 struct btrfs_root *root, unsigned long count); 1998 struct btrfs_root *root, unsigned long count);
1997int btrfs_lookup_extent(struct btrfs_root *root, u64 start, u64 len); 1999int btrfs_lookup_extent(struct btrfs_root *root, u64 start, u64 len);
2000int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
2001 struct btrfs_root *root, u64 bytenr,
2002 u64 num_bytes, u64 *refs, u64 *flags);
1998int btrfs_pin_extent(struct btrfs_root *root, 2003int btrfs_pin_extent(struct btrfs_root *root,
1999 u64 bytenr, u64 num, int reserved); 2004 u64 bytenr, u64 num, int reserved);
2000int btrfs_drop_leaf_ref(struct btrfs_trans_handle *trans, 2005int btrfs_drop_leaf_ref(struct btrfs_trans_handle *trans,
@@ -2075,8 +2080,6 @@ u64 btrfs_reduce_alloc_profile(struct btrfs_root *root, u64 flags);
2075void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde); 2080void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde);
2076void btrfs_clear_space_info_full(struct btrfs_fs_info *info); 2081void btrfs_clear_space_info_full(struct btrfs_fs_info *info);
2077 2082
2078int btrfs_reserve_metadata_space(struct btrfs_root *root, int num_items);
2079int btrfs_unreserve_metadata_space(struct btrfs_root *root, int num_items);
2080int btrfs_unreserve_metadata_for_delalloc(struct btrfs_root *root, 2083int btrfs_unreserve_metadata_for_delalloc(struct btrfs_root *root,
2081 struct inode *inode, int num_items); 2084 struct inode *inode, int num_items);
2082int btrfs_reserve_metadata_for_delalloc(struct btrfs_root *root, 2085int btrfs_reserve_metadata_for_delalloc(struct btrfs_root *root,
@@ -2089,6 +2092,13 @@ void btrfs_delalloc_reserve_space(struct btrfs_root *root, struct inode *inode,
2089 u64 bytes); 2092 u64 bytes);
2090void btrfs_delalloc_free_space(struct btrfs_root *root, struct inode *inode, 2093void btrfs_delalloc_free_space(struct btrfs_root *root, struct inode *inode,
2091 u64 bytes); 2094 u64 bytes);
2095int btrfs_trans_reserve_metadata(struct btrfs_trans_handle *trans,
2096 struct btrfs_root *root,
2097 int num_items, int *retries);
2098void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans,
2099 struct btrfs_root *root);
2100int btrfs_snap_reserve_metadata(struct btrfs_trans_handle *trans,
2101 struct btrfs_pending_snapshot *pending);
2092void btrfs_init_block_rsv(struct btrfs_block_rsv *rsv); 2102void btrfs_init_block_rsv(struct btrfs_block_rsv *rsv);
2093struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root); 2103struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root);
2094void btrfs_free_block_rsv(struct btrfs_root *root, 2104void btrfs_free_block_rsv(struct btrfs_root *root,
@@ -2296,6 +2306,12 @@ int btrfs_del_inode_ref(struct btrfs_trans_handle *trans,
2296 struct btrfs_root *root, 2306 struct btrfs_root *root,
2297 const char *name, int name_len, 2307 const char *name, int name_len,
2298 u64 inode_objectid, u64 ref_objectid, u64 *index); 2308 u64 inode_objectid, u64 ref_objectid, u64 *index);
2309struct btrfs_inode_ref *
2310btrfs_lookup_inode_ref(struct btrfs_trans_handle *trans,
2311 struct btrfs_root *root,
2312 struct btrfs_path *path,
2313 const char *name, int name_len,
2314 u64 inode_objectid, u64 ref_objectid, int mod);
2299int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans, 2315int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans,
2300 struct btrfs_root *root, 2316 struct btrfs_root *root,
2301 struct btrfs_path *path, u64 objectid); 2317 struct btrfs_path *path, u64 objectid);