[PATCH 3/8] qemu: Support <disk device='lun'> for iSCSI direct mapped volumes

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

 



Commit c820fbff9fbfe1f2549a5b60967496587f8d8bfc added support for iSCSI
disk as backing for <disk device='lun'>. We would not use it for a disk
type="volume" with direct access mode which basically maps to direct
iSCSI usage. Fix it by adding the storage source type accessor that
resolves the volume type.
---
 src/qemu/qemu_command.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c65ab16..e6f0181 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -907,7 +907,8 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk)
                            virDomainDiskQEMUBusTypeToString(disk->bus));
             goto error;
         }
-        if (disk->src->type == VIR_STORAGE_TYPE_NETWORK) {
+
+        if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_NETWORK) {
             if (disk->src->protocol != VIR_STORAGE_NET_PROTOCOL_ISCSI) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                                _("disk device='lun' is not supported "
-- 
2.8.1

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