summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2016-01-29 13:03:32 +0800
committerDavid Sterba <dsterba@suse.com>2016-06-07 18:15:19 +0200
commitcfdcb4fa616cb7cef3f11e266ac57adba9079ac0 (patch)
tree2aa36ee6771b59894c4e4906344e4669acf0f364 /extent-tree.c
parent561f773433129acf5ba2bdd9abd85876f5d098ce (diff)
btrfs-progs: Cleanup old btrfs-convert
Cleanup all the old btrfs-convert facilities, including: 1) btrfs_convert_operations->alloc/free/test_extents* No need to do non-standard extent allocation. After init_btrfs() everything can be done by normal routine. Now only 4 functions are needed in btrfs_convert_operations. 1) open_fs 2) read_used_space 3) copy_inodes 4) close_fs 2) fs_info->extent_ops Same as above. 3) Old init_btrfs(), create_image(), create_file_image_range() Replaced with newer and cleaner one. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/extent-tree.c b/extent-tree.c
index f9e4bf2d..5ca53fa9 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -2181,7 +2181,6 @@ static int __free_extent(struct btrfs_trans_handle *trans,
struct btrfs_key key;
struct btrfs_path *path;
- struct btrfs_extent_ops *ops = root->fs_info->extent_ops;
struct btrfs_root *extent_root = root->fs_info->extent_root;
struct extent_buffer *leaf;
struct btrfs_extent_item *ei;
@@ -2382,14 +2381,6 @@ static int __free_extent(struct btrfs_trans_handle *trans,
}
}
- if (ops && ops->free_extent) {
- ret = ops->free_extent(root, bytenr, num_bytes);
- if (ret > 0) {
- pin = 0;
- mark_free = 0;
- }
- }
-
if (pin) {
ret = pin_down_bytes(trans, root, bytenr, num_bytes,
is_data);
@@ -2662,13 +2653,6 @@ int btrfs_reserve_extent(struct btrfs_trans_handle *trans,
u64 alloc_profile;
struct btrfs_fs_info *info = root->fs_info;
- if (info->extent_ops) {
- struct btrfs_extent_ops *ops = info->extent_ops;
- ret = ops->alloc_extent(root, num_bytes, hint_byte, ins, !data);
- BUG_ON(ret);
- goto found;
- }
-
if (data) {
alloc_profile = info->avail_data_alloc_bits &
info->data_alloc_profile;
@@ -2702,7 +2686,6 @@ int btrfs_reserve_extent(struct btrfs_trans_handle *trans,
trans->alloc_exclude_start,
trans->alloc_exclude_nr, data);
BUG_ON(ret);
-found:
clear_extent_dirty(&root->fs_info->free_space_cache,
ins->objectid, ins->objectid + ins->offset - 1,
GFP_NOFS);