On Fri, Aug 15, 2014 at 12:44:21PM +0400, Roman Bogorodskiy wrote:
virStorageBackendVolDownloadLocal and
virStorageBackendVolUploadLocal
use virFDStreamOpenFile function to work with the volume fd.
virFDStreamOpenFile calls virFDStreamOpenFileInternal that implements
handling of the non-blocking I/O. If a file is not a character device and
not a fifo, it uses libvirt_iohelper.
On FreeBSD, it doesn't work as expected because disks are exposed as
character devices.
Why does that cause a problem ? The reason we use iohelper is because
POSIX does not have O_NONBLOCK work on plain files, so we need to use
the iohelper so that we have a pipe we can set O_NONBLOCK on. If FreeBSD
disks are character devices though, O_NONBLOCK should work fine on them
avoiding the need for iohelper.
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 :|