]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Add a helper try_merge_free_space()
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 9 Nov 2010 06:56:50 +0000 (14:56 +0800)
committerLi Zefan <lizf@cn.fujitsu.com>
Wed, 26 Jan 2011 17:04:50 +0000 (01:04 +0800)
commit2d6029c4753ba41c82660582771baddcd738aeb8
treefc2b1d1e9555f2f9de847ba4134d827613c66e73
parentf957718a7e535eaa572ffb1470fcdea60f39f155
btrfs: Add a helper try_merge_free_space()

When adding a new extent, we'll firstly see if we can merge
this extent to the left or/and right extent. Extract this as
a helper try_merge_free_space().

As a side effect, we fix a small bug that if the new extent
has non-bitmap left entry but is unmergeble, we'll directly
link the extent without trying to drop it into bitmap.

This also prepares for the next patch.

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