Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128998
b: refs/heads/master
c: 3b7885b
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Nov 7, 2008
1 parent 2d6eb2f commit 905f70b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 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: 771ed689d2cd53439e28e095bc38fbe40a71429e
refs/heads/master: 3b7885bf96e03271a9fff41124c38ed7176616e2
17 changes: 17 additions & 0 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,23 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans,
if (search_start + num_bytes > end)
goto new_group;

if (last_ptr && *last_ptr && search_start != *last_ptr) {
total_needed += empty_cluster;
*last_ptr = 0;
/*
* if search_start is still in this block group
* then we just re-search this block group
*/
if (search_start >= start &&
search_start < end) {
mutex_unlock(&block_group->alloc_mutex);
continue;
}

/* else we go to the next block group */
goto new_group;
}

if (exclude_nr > 0 &&
(search_start + num_bytes > exclude_start &&
search_start < exclude_start + exclude_nr)) {
Expand Down
7 changes: 0 additions & 7 deletions trunk/fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2494,13 +2494,6 @@ int extent_write_cache_pages(struct extent_io_tree *tree,
index = 0;
goto retry;
}
if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0))
mapping->writeback_index = index;
if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
range_whole = 1;

if (wbc->range_cont)
wbc->range_start = index << PAGE_CACHE_SHIFT;
return ret;
}
EXPORT_SYMBOL(extent_write_cache_pages);
Expand Down

0 comments on commit 905f70b

Please sign in to comment.