[libvirt] [PATCH 3/3] Add volume zeroing

Paolo Bonzini pbonzini at redhat.com
Mon Feb 15 21:47:33 UTC 2010


On 02/15/2010 10:29 PM, David Allan wrote:
> * If the volume is a sparse file and the fiemap ioctl is available,
> use fiemap to locate the volume's extents.

What about for a sparse file doing just

   ftruncate (fd, 0);
   ftruncate (fd, st.st_size);

?

It's already sparse, it doesn't hurt to make it _more_ sparse.

Paolo




More information about the libvir-list mailing list