• R
    fdstream: introduce virFDStreamOpenBlockDevice · f5b4c141
    Roman Bogorodskiy 提交于
    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 disk devices (including
    ZFS volumes) are exposed as character devices, and ZFS volumes do not
    support open(2) with O_NONBLOCK.
    
    To overcome this, introduce a forceIOHelper flag to
    virFDStreamOpenFileInternal that forces using libvirt_iohelper. And
    introduce virFDStreamOpenBlockDevice that calls
    virFDStreamOpenFileInternal with the forceIOHelper set to true.
    f5b4c141
libvirt_private.syms 48.7 KB