aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2009-06-27 21:07:35 -0400
committerChris Mason <chris.mason@oracle.com>2009-07-02 13:41:17 -0400
commit2c47e605a91dde6b0514f689645e7ab336c8592a (patch)
treed541e61440f06f37d17e2d14cbaa78fc0cd41ff2 /fs/btrfs/ctree.h
parenta970b0a16cc416a509d5ae8b1d70978664e6f4fe (diff)
Btrfs: update backrefs while dropping snapshot
The new backref format has restriction on type of backref item. If a tree block isn't referenced by its owner tree, full backrefs must be used for the pointers in it. When a tree block loses its owner tree's reference, backrefs for the pointers in it should be updated to full backrefs. Current btrfs_drop_snapshot misses the code that updates backrefs, so it's unsafe for general use. This patch adds backrefs update code to btrfs_drop_snapshot. It isn't a problem in the restricted form btrfs_drop_snapshot is used today, but for general snapshot deletion this update is required. 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.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 03441a99ea38..a404ecc53eb1 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2076,8 +2076,7 @@ static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans,
2076int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); 2076int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path);
2077int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); 2077int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path);
2078int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); 2078int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf);
2079int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root 2079int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref);
2080 *root);
2081int btrfs_drop_subtree(struct btrfs_trans_handle *trans, 2080int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
2082 struct btrfs_root *root, 2081 struct btrfs_root *root,
2083 struct extent_buffer *node, 2082 struct extent_buffer *node,