Skip to content
Commit 6ae06ff5 authored by Ashish Sangwan's avatar Ashish Sangwan Committed by Theodore Ts'o
Browse files

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: default avatarAshish Sangwan <a.sangwan@samsung.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 41a5b913
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment