search for: total_needed

Displaying 4 results from an estimated 4 matches for "total_needed".

2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
...trfs/extent-tree.c b/fs/btrfs/extent-tree.c index 26fec19..3e9b675 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2552,14 +2552,10 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root = orig_root->fs_info->extent_root; u64 total_needed = num_bytes; u64 *last_ptr = NULL; - u64 last_wanted = 0; struct btrfs_block_group_cache *block_group = NULL; - int chunk_alloc_done = 0; int empty_cluster = 2 * 1024 * 1024; int allowed_chunk_alloc = 0; - struct list_head *head = NULL, *cur = NULL; - int loop = 0; - int extra_loop = 0; + i...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...ed at by the hint either isn''t of the correct type, or just doesn''t have the space we need, we set head to space_info->block_groups, so we start at the beginning of the block groups for this particular space info, and loop through. This is also where we add the empty_cluster to total_needed. At this point loop is set to 1 and we just loop through all of the block groups for this particular space_info looking for the space we need, just as find_free_space would have done, except we only hit the block groups we want and not _all_ of the block groups. If we come full circle we see if w...
2007 Nov 12
0
[PATCH]Minor fix for find_search_start
...cache = btrfs_find_block_group(root, cache, last, data, 0); *cache_ret = cache; cache_miss = 0; goto again; @@ -955,8 +957,8 @@ static int find_free_extent(struct btrfs path = btrfs_alloc_path(); check_failed: - search_start = find_search_start(root, &block_group, - search_start, total_needed, data); + search_start = find_search_start(root, &block_group, search_start, + total_needed, data, full_scan); cached_start = search_start; btrfs_init_path(path);
2008 Sep 30
0
[PATCH] fix seekiness due to finding the wrong block group
...redhat.com> Index: root/btrfs-unstable/fs/btrfs/extent-tree.c =================================================================== --- root.orig/btrfs-unstable/fs/btrfs/extent-tree.c +++ root/btrfs-unstable/fs/btrfs/extent-tree.c @@ -2238,7 +2238,10 @@ static int noinline find_free_extent(str total_needed += empty_size; new_group: - block_group = btrfs_lookup_first_block_group(info, search_start); + block_group = btrfs_lookup_block_group(info, search_start); + if (!block_group) + block_group = btrfs_lookup_first_block_group(info, + search_start); /* * Ok this looks a little tri...