diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-04-25 10:12:38 (GMT) |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-06 19:55:17 (GMT) |
commit | 3c76cd84e0c0d3ceb094a1020f8c55c2417e18d3 (patch) | |
tree | d6eff1c66de7391fb4188ee5ee13641e49eb7433 /mm/slab_common.c | |
parent | fc36ed7e0b13955ba66fc56dc5067e67ac105150 (diff) | |
download | linux-fsl-qoriq-3c76cd84e0c0d3ceb094a1020f8c55c2417e18d3.tar.xz |
Btrfs: allocate new chunks if the space is not enough for global rsv
When running the 208th of xfstests, the fs returned the enospc
error when there was lots of free space in the disk.
By bisect debug, we found it was introduced by commit 96f1bb5777.
This commit makes the space check for the global reservation in
can_overcommit() be inconsistent with should_alloc_chunk().
can_overcommit() requires that the free space is 2 times the size
of the global reservation, or we can't do overcommit. And instead,
we need reclaim some reserved space, and if we still don't have
enough free space, we need allocate a new chunk. But unfortunately,
should_alloc_chunk() just requires that the free space is 1 time
the size of the global reservation, that is we would not try to
allocate a new chunk if the free space size is in the middle of
these two requires, and just return the enospc error. Fix it.
Cc: Jim Schutt <jaschut@sandia.gov>
Cc: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'mm/slab_common.c')
0 files changed, 0 insertions, 0 deletions