Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286014
b: refs/heads/master
c: 96bdc7d
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Jan 16, 2012
1 parent f0fb570 commit c4e075f
Show file tree
Hide file tree
Showing 3 changed files with 5 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: f248679e86fead40cc78e724c7181d6bec1a2046
refs/heads/master: 96bdc7dc61fb1b1e8e858dafb13abee8482ba064
3 changes: 3 additions & 0 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3384,6 +3384,9 @@ static int should_alloc_chunk(struct btrfs_root *root,

/* 256MB or 2% of the FS */
thresh = max_t(u64, 256 * 1024 * 1024, div_factor_fine(thresh, 2));
/* system chunks need a much small threshold */
if (sinfo->flags & BTRFS_BLOCK_GROUP_SYSTEM)
thresh = 32 * 1024 * 1024;

if (num_bytes > thresh && sinfo->bytes_used < div_factor(num_bytes, 8))
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3166,7 +3166,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
max_stripe_size = 256 * 1024 * 1024;
max_chunk_size = max_stripe_size;
} else if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
max_stripe_size = 8 * 1024 * 1024;
max_stripe_size = 32 * 1024 * 1024;
max_chunk_size = 2 * max_stripe_size;
} else {
printk(KERN_ERR "btrfs: invalid chunk type 0x%llx requested\n",
Expand Down

0 comments on commit c4e075f

Please sign in to comment.