Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349175
b: refs/heads/master
c: a105bb8
h: refs/heads/master
i:
  349173: 87c6421
  349171: 76f598e
  349167: 8da8d71
v: v3
  • Loading branch information
Ilya Dryomov authored and Chris Mason committed Jan 22, 2013
1 parent 96be4f9 commit 007c14a
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 83bfccb5c085658b0ad1450a6fc13b0bb5440970
refs/heads/master: a105bb88f46b60de2adf1ee98745bd59362b09ab
9 changes: 8 additions & 1 deletion trunk/fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2614,7 +2614,14 @@ static int chunk_usage_filter(struct btrfs_fs_info *fs_info, u64 chunk_offset,
cache = btrfs_lookup_block_group(fs_info, chunk_offset);
chunk_used = btrfs_block_group_used(&cache->item);

user_thresh = div_factor_fine(cache->key.offset, bargs->usage);
if (bargs->usage == 0)
user_thresh = 0;
else if (bargs->usage > 100)
user_thresh = cache->key.offset;
else
user_thresh = div_factor_fine(cache->key.offset,
bargs->usage);

if (chunk_used < user_thresh)
ret = 0;

Expand Down

0 comments on commit 007c14a

Please sign in to comment.