[PATCH 0/2] Two simple sparse streams fixes

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

 



I've been experimenting with sparse streams and found a bug. If you try to
download a volume which doesn't support sparseness here's what happens:

# virsh vol-download --sparse /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0 /mnt/floppy/blah.raw

# echo $?
0
# ls -lhs /mnt/floppy/bla.raw
0 -rw-r--r-- 1 root root 0 May 30 12:40 /mnt/floppy/bla.raw

That's not good. iSCSI doesn't know anything about sparseness so an error is
expected here. Fortunately, the fix is fairly simple:

# virsh vol-download --sparse /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0 /mnt/floppy/bla.raw
error: cannot close volume /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0
error: Unable to seek to data: Invalid argument


Michal Privoznik (2):
  virfdstream: Check for thread error more frequently
  fdstream: Report error from the I/O thread

 daemon/stream.c        | 18 ++++++++++++------
 src/util/virfdstream.c | 22 ++++++++++++++++++++--
 2 files changed, 32 insertions(+), 8 deletions(-)

-- 
2.13.0

--
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]
  Powered by Linux