diff options
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index a421069e998b..d6243c2afc73 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -1630,11 +1630,11 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans, | |||
1630 | struct btrfs_path *path; | 1630 | struct btrfs_path *path; |
1631 | 1631 | ||
1632 | btrfs_set_stack_extent_refs(&extent_item, 1); | 1632 | btrfs_set_stack_extent_refs(&extent_item, 1); |
1633 | #if 0 | 1633 | |
1634 | new_hint = max(hint_byte, 16ULL * 1024 * 1024 * 1024); | 1634 | new_hint = max(hint_byte, root->fs_info->alloc_start); |
1635 | if (new_hint < btrfs_super_total_bytes(&info->super_copy)) | 1635 | if (new_hint < btrfs_super_total_bytes(&info->super_copy)) |
1636 | hint_byte = new_hint; | 1636 | hint_byte = new_hint; |
1637 | #endif | 1637 | |
1638 | WARN_ON(num_bytes < root->sectorsize); | 1638 | WARN_ON(num_bytes < root->sectorsize); |
1639 | ret = find_free_extent(trans, root, num_bytes, empty_size, | 1639 | ret = find_free_extent(trans, root, num_bytes, empty_size, |
1640 | search_start, search_end, hint_byte, ins, | 1640 | search_start, search_end, hint_byte, ins, |
@@ -2239,7 +2239,7 @@ static int relocate_one_reference(struct btrfs_root *extent_root, | |||
2239 | free_extent_buffer(eb); | 2239 | free_extent_buffer(eb); |
2240 | 2240 | ||
2241 | path->lowest_level = level; | 2241 | path->lowest_level = level; |
2242 | path->reada = 0; | 2242 | path->reada = 2; |
2243 | ret = btrfs_search_slot(trans, found_root, &found_key, path, | 2243 | ret = btrfs_search_slot(trans, found_root, &found_key, path, |
2244 | 0, 1); | 2244 | 0, 1); |
2245 | path->lowest_level = 0; | 2245 | path->lowest_level = 0; |
@@ -2372,6 +2372,7 @@ int btrfs_shrink_extent_tree(struct btrfs_root *root, u64 new_size) | |||
2372 | block_group_cache = &info->block_group_cache; | 2372 | block_group_cache = &info->block_group_cache; |
2373 | path = btrfs_alloc_path(); | 2373 | path = btrfs_alloc_path(); |
2374 | root = root->fs_info->extent_root; | 2374 | root = root->fs_info->extent_root; |
2375 | path->reada = 2; | ||
2375 | 2376 | ||
2376 | again: | 2377 | again: |
2377 | total_found = 0; | 2378 | total_found = 0; |