Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128468
b: refs/heads/master
c: cf67582
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent aff0a86 commit 4b1441a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 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: d3c2fdcf7b79079f60ac64e61d886964d4647910
refs/heads/master: cf67582bb2ec364d71b3e4f8e49de98d8c3c832e
18 changes: 4 additions & 14 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,20 +1111,9 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_release_path(root, path);
BUG_ON(ins->objectid < search_start);

if (ins->objectid + num_blocks >= search_end) {
if (full_scan) {
ret = -ENOSPC;
goto error;
}
search_start = orig_search_start;
if (wrapped) {
if (!full_scan)
total_needed -= empty_size;
full_scan = 1;
} else
wrapped = 1;
goto new_group;
}
if (ins->objectid + num_blocks >= search_end)
goto enospc;

for (test_block = ins->objectid;
test_block < ins->objectid + num_blocks; test_block++) {
if (test_radix_bit(&info->pinned_radix, test_block) ||
Expand All @@ -1149,6 +1138,7 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root

new_group:
if (search_start + num_blocks >= search_end) {
enospc:
search_start = orig_search_start;
if (full_scan) {
ret = -ENOSPC;
Expand Down

0 comments on commit 4b1441a

Please sign in to comment.