Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128963
b: refs/heads/master
c: 45b8c9a
h: refs/heads/master
i:
  128961: dd8cd6d
  128959: 877dc98
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Sep 30, 2008
1 parent 528f846 commit 423c544
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: d352ac68148b69937d39ca5d48bcc4478e118dbf
refs/heads/master: 45b8c9a8b1e15bf79c2c17ec217adf96785f8011
9 changes: 7 additions & 2 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,10 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans,
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 tricky, buts its really simple. First if we
Expand All @@ -2255,8 +2258,10 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans,
if (!block_group || (!block_group_bits(block_group, data) &&
last_ptr && *last_ptr)) {
if (search_start != orig_search_start) {
if (last_ptr && *last_ptr)
if (last_ptr && *last_ptr) {
total_needed += empty_cluster;
*last_ptr = 0;
}
search_start = orig_search_start;
goto new_group;
} else if (!chunk_alloc_done && allowed_chunk_alloc) {
Expand Down

0 comments on commit 423c544

Please sign in to comment.