Btrfs: add pinned extents to on-disk free space cache correctly
commitdb804f23a72bada58f083dfad6a65d019ddb3bd4
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 10 Jan 2012 08:41:01 +0000 (10 16:41 +0800)
committerLi Zefan <lizf@cn.fujitsu.com>
Wed, 11 Jan 2012 02:26:31 +0000 (11 10:26 +0800)
tree24c7a53995b61b5f98d87b8db136fc908a3a035f
parentd25223a0d22f7ec4203ec285dc6e51f696591ba3
Btrfs: add pinned extents to on-disk free space cache correctly

I got this while running xfstests:

[24256.836098] block group 317849600 has an wrong amount of free space
[24256.836100] btrfs: failed to load free space cache for block group 317849600

We should clamp the extent returned by find_first_extent_bit(),
so the start of the extent won't smaller than the start of the
block group.

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