OSDN Git Service

libext2fs: zero blocks via FALLOC_FL_ZERO_RANGE in ext2fs_zero_blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 29 Mar 2015 03:01:08 +0000 (23:01 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 29 Mar 2015 03:08:25 +0000 (23:08 -0400)
commit3d28f54589909de7abe477c2ca9d2ff7b0f2404d
tree90ea0a5fbc1ab6ecf0b3355b7c91154f0da8f249
parent41f2210131cfbaa4059cebae3a9b0f104fe89f70
libext2fs: zero blocks via FALLOC_FL_ZERO_RANGE in ext2fs_zero_blocks

Plumb a new call into the IO manager to support translating
ext2fs_zero_blocks calls into the equivalent FALLOC_FL_ZERO_RANGE
fallocate flag primitive when possible.  This patch provides _only_
support for file-based images.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2_io.h
lib/ext2fs/io_manager.c
lib/ext2fs/mkjournal.c
lib/ext2fs/test_io.c
lib/ext2fs/unix_io.c