Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243157
b: refs/heads/master
c: d0a365e
h: refs/heads/master
i:
  243155: ad90b21
v: v3
  • Loading branch information
Josef Bacik committed Mar 21, 2011
1 parent a491a91 commit 9c46585
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: 7d0d2e8e6b6f7da221a25238cf490a095c8c4788
refs/heads/master: d0a365e84a886ce6b5b7f7a76be0bb24934ec8f0
9 changes: 4 additions & 5 deletions trunk/fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1910,8 +1910,8 @@ static int btrfs_bitmap_cluster(struct btrfs_block_group_cache *block_group,

i = offset_to_bit(entry->offset, block_group->sectorsize,
max_t(u64, offset, entry->offset));
search_bits = bytes_to_bits(min_bytes, block_group->sectorsize);
total_bits = bytes_to_bits(bytes, block_group->sectorsize);
search_bits = bytes_to_bits(bytes, block_group->sectorsize);
total_bits = bytes_to_bits(min_bytes, block_group->sectorsize);

again:
found_bits = 0;
Expand Down Expand Up @@ -2034,8 +2034,7 @@ int btrfs_find_space_cluster(struct btrfs_trans_handle *trans,

if (entry->bitmap && entry->bytes > bytes + empty_size) {
ret = btrfs_bitmap_cluster(block_group, entry, cluster,
offset, bytes + empty_size,
min_bytes);
offset, bytes, min_bytes);
if (!ret)
goto got_it;
}
Expand Down Expand Up @@ -2065,7 +2064,7 @@ int btrfs_find_space_cluster(struct btrfs_trans_handle *trans,

while (1) {
/* out window is just right, lets fill it */
if (window_free >= bytes + empty_size)
if (window_free >= min_bytes)
break;

node = rb_next(&last->offset_index);
Expand Down

0 comments on commit 9c46585

Please sign in to comment.