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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/16/2010 05:08 AM, Dave Allan wrote:

What about for a sparse file doing just

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

That's a good point.  The only thing that makes me hesitate is that
I'm not certain that the file is guaranteed to contain zeros
following the second call to ftruncate,

I think since it's sparse, it must be a regular file?  If so, it would
be fine as Eric pointed out.

a volume represented by a regular file on a backend that doesn't
support volume delete. If that's so, we could just skip the whole
zeroing operation entirely for regular files.

Looks like it...

Paolo

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]