<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Aug 2, 2018 at 10:06 PM Nir Soffer <<a href="mailto:nirsof@gmail.com">nirsof@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is the second version to support efficient zero for block devices<br>
on older kernels (e.g. RHEL 7.5), and file systems that do not support<br>
yet FALLOC_FS_ZERO_RANGE (e.g. NFS 4.2).<br>
<br>
Changes since v1:<br>
- Split to smaller patches<br>
- Skip linux only includes on other systems<br>
- Skip code using BLKZEROOUT if the macro is not defined<br>
- Try BLKZEROOUT only if the offset and count are aligned to device<br>
  sector size.<br></blockquote><div><br></div><div>Other changes I forgot to mention (interrupted by a child):</div><div>- initialize h->can_* properly. Before they were uninitialized if FALLOC_FL_*</div><div>  macros were not defined. </div><div>- Use new h->can_punch_hole in file_can_trim, so now we report the actual</div><div>  capability once we detected it.</div><div>- Use h->can_punch_hole in file_trim, so we try only once if the operation is not</div><div>  supported.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
v1 was here:<br>
<a href="https://www.redhat.com/archives/libguestfs/2018-July/msg00084.html" rel="noreferrer" target="_blank">https://www.redhat.com/archives/libguestfs/2018-July/msg00084.html</a><br>
<br>
Nir Soffer (3):<br>
  file: Avoid unsupported fallocate() calls<br>
  file: Support zero without ZERO_RANGE<br>
  file: Zero for block devices on old kernels<br>
<br>
 plugins/file/file.c | 194 +++++++++++++++++++++++++++++++++-----------<br>
 1 file changed, 147 insertions(+), 47 deletions(-)<br>
<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div></div>