aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorYan, Zheng <zheng.yan@oracle.com>2010-05-16 10:49:59 -0400
committerChris Mason <chris.mason@oracle.com>2010-05-25 10:34:54 -0400
commit3fd0a5585eb98e074fb9934549c8d85c49756c0d (patch)
tree3e7ff9bd9678a5eea62818a2f4a50e19dda91a81 /fs/btrfs/ctree.h
parentefa56464562991b8c24f965199888806bd8c4b38 (diff)
Btrfs: Metadata ENOSPC handling for balance
This patch adds metadata ENOSPC handling for the balance code. It is consisted by following major changes: 1. Avoid COW tree leave in the phrase of merging tree. 2. Handle interaction with snapshot creation. 3. make the backref cache can live across transactions. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 65530837d04b..5ed0223d1cbe 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2205,7 +2205,8 @@ static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans,
2205int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); 2205int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path);
2206int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); 2206int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path);
2207int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); 2207int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf);
2208int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref); 2208int btrfs_drop_snapshot(struct btrfs_root *root,
2209 struct btrfs_block_rsv *block_rsv, int update_ref);
2209int btrfs_drop_subtree(struct btrfs_trans_handle *trans, 2210int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
2210 struct btrfs_root *root, 2211 struct btrfs_root *root,
2211 struct extent_buffer *node, 2212 struct extent_buffer *node,
@@ -2479,4 +2480,12 @@ int btrfs_update_reloc_root(struct btrfs_trans_handle *trans,
2479 struct btrfs_root *root); 2480 struct btrfs_root *root);
2480int btrfs_recover_relocation(struct btrfs_root *root); 2481int btrfs_recover_relocation(struct btrfs_root *root);
2481int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len); 2482int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len);
2483void btrfs_reloc_cow_block(struct btrfs_trans_handle *trans,
2484 struct btrfs_root *root, struct extent_buffer *buf,
2485 struct extent_buffer *cow);
2486void btrfs_reloc_pre_snapshot(struct btrfs_trans_handle *trans,
2487 struct btrfs_pending_snapshot *pending,
2488 u64 *bytes_to_reserve);
2489void btrfs_reloc_post_snapshot(struct btrfs_trans_handle *trans,
2490 struct btrfs_pending_snapshot *pending);
2482#endif 2491#endif