Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 120d66ee authored by Li Zefan's avatar Li Zefan
Browse files

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: default avatarJosef Bacik <josef@redhat.com>
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
parent 5e71b5d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment