btrfs: Fix threshold calculation for block groups smaller than 1GB
commit8eb2d829ffea3677c21bd038f19e5d8ca6b43e36
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 9 Nov 2010 06:48:01 +0000 (9 14:48 +0800)
committerLi Zefan <lizf@cn.fujitsu.com>
Wed, 26 Jan 2011 17:04:31 +0000 (27 01:04 +0800)
treefc96e4d61125b703df38ee133a3d031f1c85d4a2
parent65e5341b9a0c39767ae1fecc727d70eda0dd6d83
btrfs: Fix threshold calculation for block groups smaller than 1GB

If a block group is smaller than 1GB, the extent entry threadhold
calculation will always set the threshold to 0.

So as free space gets fragmented, btrfs will switch to use bitmap
to manage free space, but then will never switch back to extents
due to this bug.

Reviewed-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
fs/btrfs/free-space-cache.c