]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: optimize starting extent in ext4_ext_rm_leaf()
authorAshish Sangwan <a.sangwan@samsung.com>
Tue, 18 Jun 2013 15:28:45 +0000 (11:28 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 18 Jun 2013 15:28:45 +0000 (11:28 -0400)
commit7d3c788cf8367fb1f23cdb05aa99726e52657761
tree821137ecce02b7b87c18ae06214f09808c9bc78d
parent3671864cfd8d989057e92d79b1e72e87945ad073
ext4: optimize starting extent in ext4_ext_rm_leaf()

Both hole punch and truncate use ext4_ext_rm_leaf() for removing
blocks.  Currently we choose the last extent as the starting
point for removing blocks:

ex = EXT_LAST_EXTENT(eh);

This is OK for truncate but for hole punch we can optimize the extent
selection as the path is already initialized.  We could use this
information to select proper starting extent.  The code change in this
patch will not affect truncate as for truncate path[depth].p_ext will
always be NULL.

Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c