]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Fix threshold calculation for block groups smaller than 1GB
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 9 Nov 2010 06:48:01 +0000 (14:48 +0800)
committerLi Zefan <lizf@cn.fujitsu.com>
Wed, 26 Jan 2011 17:04:31 +0000 (01:04 +0800)
commit9f1498d33cb19746a53853c8f4bcad38864b6db4
treefc96e4d61125b703df38ee133a3d031f1c85d4a2
parent6e9af14610a020d54466be792c8819eebd6216a9
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