On Thu, Aug 02, 2018 at 10:05:28PM +0300, Nir Soffer wrote:
File systems not supporting FALLOC_FL_ZERO_RANGE yet fall back to manual zeroing.
We can avoid this by combining two fallocate calls:
fallocate(FALLOC_FL_PUNHCH_HOLE)
"PUNCH"
fallocate(0)
+#ifdef FALLOC_FL_PUNCH_HOLE + /* If we can punch hole but may not trim, we can combine punching hole and + fallocate to zero a range. This is expected to be more efficient than + writing zeros manually. */
Although we can fix this before pushing so there's no need to submit a new version, it's better if the comment style sticks to the same as used elsewhere, ie: /* Commmnt * More comment */ Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org