Searched hist:"4 f579ae7de560e5f449587a6c3f02594d53d4d51" (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/fs/ext4/ |
H A D | indirect.c | diff 4f579ae7de560e5f449587a6c3f02594d53d4d51 Tue Jul 15 05:03:38 CDT 2014 Lukas Czerner <lczerner@redhat.com> ext4: fix punch hole on files with indirect mapping
Currently punch hole code on files with direct/indirect mapping has some problems which may lead to a data loss. For example (from Jan Kara):
fallocate -n -p 10240000 4096
will punch the range 10240000 - 12632064 instead of the range 1024000 - 10244096.
Also the code is a bit weird and it's not using infrastructure provided by indirect.c, but rather creating it's own way.
This patch fixes the issues as well as making the operation to run 4 times faster from my testing (punching out 60GB file). It uses similar approach used in ext4_ind_truncate() which takes advantage of ext4_free_branches() function.
Also rename the ext4_free_hole_blocks() to something more sensible, like the equivalent we have for extent mapped files. Call it ext4_ind_remove_space().
This has been tested mostly with fsx and some xfstests which are testing punch hole but does not require unwritten extents which are not supported with direct/indirect mapping. Not problems showed up even with 1024k block size.
CC: stable@vger.kernel.org Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
H A D | ext4.h | diff 4f579ae7de560e5f449587a6c3f02594d53d4d51 Tue Jul 15 05:03:38 CDT 2014 Lukas Czerner <lczerner@redhat.com> ext4: fix punch hole on files with indirect mapping
Currently punch hole code on files with direct/indirect mapping has some problems which may lead to a data loss. For example (from Jan Kara):
fallocate -n -p 10240000 4096
will punch the range 10240000 - 12632064 instead of the range 1024000 - 10244096.
Also the code is a bit weird and it's not using infrastructure provided by indirect.c, but rather creating it's own way.
This patch fixes the issues as well as making the operation to run 4 times faster from my testing (punching out 60GB file). It uses similar approach used in ext4_ind_truncate() which takes advantage of ext4_free_branches() function.
Also rename the ext4_free_hole_blocks() to something more sensible, like the equivalent we have for extent mapped files. Call it ext4_ind_remove_space().
This has been tested mostly with fsx and some xfstests which are testing punch hole but does not require unwritten extents which are not supported with direct/indirect mapping. Not problems showed up even with 1024k block size.
CC: stable@vger.kernel.org Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
H A D | inode.c | diff 4f579ae7de560e5f449587a6c3f02594d53d4d51 Tue Jul 15 05:03:38 CDT 2014 Lukas Czerner <lczerner@redhat.com> ext4: fix punch hole on files with indirect mapping
Currently punch hole code on files with direct/indirect mapping has some problems which may lead to a data loss. For example (from Jan Kara):
fallocate -n -p 10240000 4096
will punch the range 10240000 - 12632064 instead of the range 1024000 - 10244096.
Also the code is a bit weird and it's not using infrastructure provided by indirect.c, but rather creating it's own way.
This patch fixes the issues as well as making the operation to run 4 times faster from my testing (punching out 60GB file). It uses similar approach used in ext4_ind_truncate() which takes advantage of ext4_free_branches() function.
Also rename the ext4_free_hole_blocks() to something more sensible, like the equivalent we have for extent mapped files. Call it ext4_ind_remove_space().
This has been tested mostly with fsx and some xfstests which are testing punch hole but does not require unwritten extents which are not supported with direct/indirect mapping. Not problems showed up even with 1024k block size.
CC: stable@vger.kernel.org Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|