Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360469
b: refs/heads/master
c: 8de972b
h: refs/heads/master
i:
  360467: 915e35d
v: v3
  • Loading branch information
Chris Mason committed Feb 1, 2013
1 parent a3ea6af commit 167d95b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 6ac0f4884eaad28441c6e0f9d1400a08c2149049
refs/heads/master: 8de972b4faa4be9b2a3c53103e18d86092a5da45
7 changes: 6 additions & 1 deletion trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -5715,6 +5715,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
* lets look there
*/
if (last_ptr) {
unsigned long aligned_cluster;
/*
* the refill lock keeps out other
* people trying to start a new cluster
Expand Down Expand Up @@ -5781,11 +5782,15 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
goto unclustered_alloc;
}

aligned_cluster = max_t(unsigned long,
empty_cluster + empty_size,
block_group->full_stripe_len);

/* allocate a cluster in this block group */
ret = btrfs_find_space_cluster(trans, root,
block_group, last_ptr,
search_start, num_bytes,
empty_cluster + empty_size);
aligned_cluster);
if (ret == 0) {
/*
* now pull our allocation out of this
Expand Down

0 comments on commit 167d95b

Please sign in to comment.