Re: [PATCH v2 1/3] virfile: Refactor safezero, introduce virFileFdPosixFallocate

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

 



On Mon, Aug 11, 2014 at 04:30:19PM -0400, John Ferlan wrote:
> Currently the safezero() function uses build conditionals to choose either
> the posix_fallocate() or mmap() with a fallback to safewrite() in order to
> preallocate a file.
> 
> This patch will modify the logic in order to allow fallbacks in the
> event that posix_fallocate() or the ftruncate()and mmap() doesn't work
> properly. The fallback will be to use the slow safewrite of zero filled
> buffers to the file.

Have you actually encountered failing of posix_fallocate() in the
real world ?  It is supposed to automatically fallback to the
equivalent of writing zeros if the filesystem / kernel does not
support it, so we should not have todo runtime fallback ourselves.
The existance of fallback is the main distinction between the
posix_fallocate() and fallocate() system calls.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]