This version addresses comments on v3. Changes since v3: - Finally got spacing right (Eric) - Reorder includes (Richard) - Return 0 or -1 instead of r (Richard) - Add common/include/isaligned.h to Makefile.am (Richard) v3 was here: https://www.redhat.com/archives/libguestfs/2018-August/msg00177.html Nir Soffer (4): file: Avoid unsupported fallocate() calls file: Support zero without ZERO_RANGE common: Add isaligned helper module file: Zero for block devices on old kernels common/include/Makefile.am | 1 + common/include/isaligned.h | 51 ++++++++++ plugins/file/Makefile.am | 3 +- plugins/file/file.c | 186 +++++++++++++++++++++++++++++-------- 4 files changed, 200 insertions(+), 41 deletions(-) create mode 100644 common/include/isaligned.h -- 2.17.1