Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128541
b: refs/heads/master
c: 5e5745d
h: refs/heads/master
i:
  128539: bce0751
v: v3
  • Loading branch information
Yan authored and Chris Mason committed Sep 25, 2008
1 parent 4dc97c7 commit 13cfc25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 324ae4df00fdc1a6a179bf584d8addf027bb75fb
refs/heads/master: 5e5745dcaf73c5860a16c09572d59383ecee6d28
14 changes: 6 additions & 8 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group(struct

return NULL;
}

static u64 find_search_start(struct btrfs_root *root,
struct btrfs_block_group_cache **cache_ret,
u64 search_start, int num, int data)
u64 search_start, int num,
int data, int full_scan)
{
int ret;
struct btrfs_block_group_cache *cache = *cache_ret;
Expand Down Expand Up @@ -218,10 +218,10 @@ static u64 find_search_start(struct btrfs_root *root,
if (cache_miss && !cache->cached) {
cache_block_group(root, cache);
last = cache_miss;

cache = btrfs_lookup_block_group(root->fs_info, last);
}
cache = btrfs_find_block_group(root, cache, last, data, 0);
if (!full_scan)
cache = btrfs_find_block_group(root, cache, last, data, 0);
*cache_ret = cache;
cache_miss = 0;
goto again;
Expand Down Expand Up @@ -979,12 +979,10 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root

total_needed += empty_size;
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);
ins->objectid = search_start;
ins->offset = 0;
Expand Down

0 comments on commit 13cfc25

Please sign in to comment.