On Tue, Jul 10, 2012 at 09:56:10PM +0530, Ashish Sangwan wrote: > Whether to continue removing extents or not is decided by the return value > of function ext4_ext_more_to_rm() which checks 2 conditions: > a) if there are no more indexes to process. > b) if the number of entries are decreased in the header of "depth -1". > > In case of hole punch, if the last block to be removed is not part of the > last extent index than this index will not be deleted, hence the number of > valid entries in the extent header of "depth - 1" will remain as it is and > ext4_ext_more_to_rm will return 0 although the required blocks are not > yet removed. > > This patch fixes the above mentioned problem as instead of removing the > extents from the end of file, it starts removing the blocks from the > particular extent from which removing blocks is actually required and > continue backward until done. > > Signed-off-by: Ashish Sangwan <ashish.sangw...@gmail.com> > Signed-off-by: Namjae Jeon <linkinj...@gmail.com> > Reviewed-by: Lukas Czerner <lczer...@redhat.com>
Applied, with a cc: to sta...@kernel.org since it is a bug fix. Thanks for submitting this patch! - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/