diff options
author | Yan, Zheng <zheng.yan@oracle.com> | 2010-05-16 10:49:59 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-05-25 10:34:54 -0400 |
commit | 3fd0a5585eb98e074fb9934549c8d85c49756c0d (patch) | |
tree | 3e7ff9bd9678a5eea62818a2f4a50e19dda91a81 /fs/btrfs/ctree.h | |
parent | efa56464562991b8c24f965199888806bd8c4b38 (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.h | 11 |
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, | |||
2205 | int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); | 2205 | int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); |
2206 | int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); | 2206 | int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); |
2207 | int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); | 2207 | int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); |
2208 | int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref); | 2208 | int btrfs_drop_snapshot(struct btrfs_root *root, |
2209 | struct btrfs_block_rsv *block_rsv, int update_ref); | ||
2209 | int btrfs_drop_subtree(struct btrfs_trans_handle *trans, | 2210 | int 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); |
2480 | int btrfs_recover_relocation(struct btrfs_root *root); | 2481 | int btrfs_recover_relocation(struct btrfs_root *root); |
2481 | int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len); | 2482 | int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len); |
2483 | void btrfs_reloc_cow_block(struct btrfs_trans_handle *trans, | ||
2484 | struct btrfs_root *root, struct extent_buffer *buf, | ||
2485 | struct extent_buffer *cow); | ||
2486 | void btrfs_reloc_pre_snapshot(struct btrfs_trans_handle *trans, | ||
2487 | struct btrfs_pending_snapshot *pending, | ||
2488 | u64 *bytes_to_reserve); | ||
2489 | void btrfs_reloc_post_snapshot(struct btrfs_trans_handle *trans, | ||
2490 | struct btrfs_pending_snapshot *pending); | ||
2482 | #endif | 2491 | #endif |