This is the second version to support efficient zero for block devices on older kernels (e.g. RHEL 7.5), and file systems that do not support yet FALLOC_FS_ZERO_RANGE (e.g. NFS 4.2).
Changes since v1: - Split to smaller patches - Skip linux only includes on other systems - Skip code using BLKZEROOUT if the macro is not defined - Try BLKZEROOUT only if the offset and count are aligned to device sector size. v1 was here: https://www.redhat.com/archives/libguestfs/2018-July/msg00084.html Nir Soffer (3): file: Avoid unsupported fallocate() calls file: Support zero without ZERO_RANGE file: Zero for block devices on old kernels plugins/file/file.c | 194 +++++++++++++++++++++++++++++++++----------- 1 file changed, 147 insertions(+), 47 deletions(-) -- 2.17.1 _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
