linux/fs/ext4
Ashish Sangwan 968dee7722 ext4: fix hole punch failure when depth is greater than 0
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.sangwan2@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Cc: stable@vger.kernel.org
2012-07-22 22:49:08 -04:00
..
acl.c
acl.h
balloc.c ext4: pass a char * to ext4_count_free() instead of a buffer_head ptr 2012-06-30 19:14:57 -04:00
bitmap.c ext4: fix overhead calculation used by ext4_statfs() 2012-07-09 16:27:05 -04:00
block_validity.c
dir.c ext4: calculate and verify checksums of directory leaf blocks 2012-04-29 18:41:10 -04:00
ext4_extents.h ext4: verify and calculate checksums for extent tree blocks 2012-04-29 18:37:10 -04:00
ext4_jbd2.c ext4: remove unnecessary argument from __ext4_handle_dirty_metadata() 2012-07-22 20:37:31 -04:00
ext4_jbd2.h ext4: remove unnecessary argument from __ext4_handle_dirty_metadata() 2012-07-22 20:37:31 -04:00
ext4.h ext4: convert last user of ext4_mark_super_dirty() to ext4_handle_dirty_super() 2012-07-22 20:31:31 -04:00
extents.c ext4: fix hole punch failure when depth is greater than 0 2012-07-22 22:49:08 -04:00
file.c ext4: convert last user of ext4_mark_super_dirty() to ext4_handle_dirty_super() 2012-07-22 20:31:31 -04:00
fsync.c
hash.c
ialloc.c ext4: remove useless marking of superblock dirty 2012-07-22 20:29:31 -04:00
indirect.c
inode.c ext4: remove unnecessary argument from __ext4_handle_dirty_metadata() 2012-07-22 20:37:31 -04:00
ioctl.c ext4: fix ext4 mismerge back in January 2012-07-22 20:27:31 -04:00
Kconfig ext4: load the crc32c driver if necessary 2012-04-29 18:27:10 -04:00
Makefile
mballoc.c ext4: remove useless marking of superblock dirty 2012-07-22 20:29:31 -04:00
mballoc.h
migrate.c userns: Convert ext4 to user kuid/kgid where appropriate 2012-05-15 14:59:27 -07:00
mmp.c ext4: add checksums to the MMP block 2012-04-29 18:47:10 -04:00
move_extent.c
namei.c ext4: remove unnecessary argument from __ext4_handle_dirty_metadata() 2012-07-22 20:37:31 -04:00
page-io.c
resize.c ext4: remove unnecessary argument from __ext4_handle_dirty_metadata() 2012-07-22 20:37:31 -04:00
super.c ext4: weed out ext4_write_super 2012-07-22 20:35:31 -04:00
symlink.c
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: use s_csum_seed instead of i_csum_seed for xattr block 2012-07-09 16:29:27 -04:00
xattr.h ext4: change on-disk layout to support extended metadata checksumming 2012-04-29 18:23:10 -04:00