Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129012
b: refs/heads/master
c: 8a1413a
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Nov 10, 2008
1 parent 4c71f98 commit 10a77a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 240d5d482b69415b92ffce4b8dfca10799c9890b
refs/heads/master: 8a1413a296d38b54ded651e76ef16c033d38fd5d
7 changes: 4 additions & 3 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2174,6 +2174,9 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans,
* group thats not of the proper type, while looping this
* should never happen
*/
if (empty_size)
extra_loop = 1;

if (!block_group)
goto new_group_no_lock;

Expand All @@ -2192,9 +2195,6 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans,

free_space = btrfs_find_free_space(block_group, search_start,
total_needed);
if (empty_size)
extra_loop = 1;

if (free_space) {
u64 start = block_group->key.objectid;
u64 end = block_group->key.objectid +
Expand All @@ -2212,6 +2212,7 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans,

if (last_wanted && search_start != last_wanted) {
total_needed += empty_cluster;
empty_size += empty_cluster;
last_wanted = 0;
/*
* if search_start is still in this block group
Expand Down

0 comments on commit 10a77a0

Please sign in to comment.