]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ext4: try to prepend extent to the existing one
authorLukas Czerner <lczerner@redhat.com>
Thu, 4 Apr 2013 03:33:28 +0000 (23:33 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Apr 2013 03:33:28 +0000 (23:33 -0400)
commitbe8981be6b820b637c88978b2241738487a98ebf
tree642810f46ba5ce06e9d66d915fbf304556e251bc
parentbc2d9db48c95ec6c9c5ecc97ddc61343d751f219
ext4: try to prepend extent to the existing one

Currently when inserting extent in ext4_ext_insert_extent() we would
only try to to see if we can append new extent to the found extent. If
we can not, then we proceed with adding new extent into the extent tree,
but then possibly merging it back again.

We can avoid this situation by trying to append and prepend new extent
to the existing ones. However since the new extent can be on either
sides of the existing extent, we have to pick the right extent to try to
append/prepend to.

This patch adds the conditions to pick the right extent to
append/prepend to and adds the actual prepending condition as well. This
will also eliminate the need to use "reserved" block for possibly
growing extent tree.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c