diff options
author | Ashish Sangwan <ashishsangwan2@gmail.com> | 2012-07-22 22:49:08 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-03-06 03:24:29 +0000 |
commit | e5a563d126bd68533e9afaf94ae5c1140921f859 (patch) | |
tree | 121dcdbc7866d665078b5b396e16de2971ab4de9 /Makefile | |
parent | 00fa8c8da0a2cb2c14f358cd0c235ca196f4da48 (diff) |
ext4: fix hole punch failure when depth is greater than 0
commit 968dee77220768a5f52cf8b21d0bdb73486febef upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions