diff options
author | Yan, Zheng <zheng.yan@oracle.com> | 2009-09-21 15:56:00 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-09-21 15:56:00 -0400 |
commit | 13a8a7c8c47e542b3cdb45bec3f431f96af79361 (patch) | |
tree | 473f3cc94b4a93a0a5f6f19b1832ef2e6b7ecf62 /fs/btrfs/tree-log.c | |
parent | 1c4850e21df8b441164d910bc611ef46a01d5d75 (diff) |
Btrfs: do not reuse objectid of deleted snapshot/subvol
The new back reference format does not allow reusing objectid of
deleted snapshot/subvol. So we use ++highest_objectid to allocate
objectid for new snapshot/subvol.
Now we use ++highest_objectid to allocate objectid for both new inode
and new snapshot/subvolume, so this patch removes 'find hole' code in
btrfs_find_free_objectid.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f4a7b62f9bea..6e674d76186d 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -2951,7 +2951,6 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree) | |||
2951 | struct btrfs_key tmp_key; | 2951 | struct btrfs_key tmp_key; |
2952 | struct btrfs_root *log; | 2952 | struct btrfs_root *log; |
2953 | struct btrfs_fs_info *fs_info = log_root_tree->fs_info; | 2953 | struct btrfs_fs_info *fs_info = log_root_tree->fs_info; |
2954 | u64 highest_inode; | ||
2955 | struct walk_control wc = { | 2954 | struct walk_control wc = { |
2956 | .process_func = process_one_buffer, | 2955 | .process_func = process_one_buffer, |
2957 | .stage = 0, | 2956 | .stage = 0, |
@@ -3010,11 +3009,6 @@ again: | |||
3010 | path); | 3009 | path); |
3011 | BUG_ON(ret); | 3010 | BUG_ON(ret); |
3012 | } | 3011 | } |
3013 | ret = btrfs_find_highest_inode(wc.replay_dest, &highest_inode); | ||
3014 | if (ret == 0) { | ||
3015 | wc.replay_dest->highest_inode = highest_inode; | ||
3016 | wc.replay_dest->last_inode_alloc = highest_inode; | ||
3017 | } | ||
3018 | 3012 | ||
3019 | key.offset = found_key.offset - 1; | 3013 | key.offset = found_key.offset - 1; |
3020 | wc.replay_dest->log_root = NULL; | 3014 | wc.replay_dest->log_root = NULL; |