[Libguestfs] [PATCH 2/3] file: Support zero without ZERO_RANGE
Nir Soffer
nsoffer at redhat.com
Thu Aug 2 19:32:19 UTC 2018
On Thu, Aug 2, 2018 at 10:28 PM Richard W.M. Jones <rjones at redhat.com>
wrote:
> 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
> */
>
I did extra work to keep the style used in this file, would be nice to use
vim default :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180802/4b066646/attachment.htm>
More information about the Libguestfs
mailing list