]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Support <disk device='lun'> for iSCSI direct mapped volumes
authorPeter Krempa <pkrempa@redhat.com>
Mon, 2 May 2016 12:47:18 +0000 (14:47 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 9 May 2016 11:16:26 +0000 (13:16 +0200)
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

index 2966b07a1c1c054292503dcfb37502152c316b87..b45ee0d4d642b5d74085902f28b1a05e636e6a66 100644 (file)
@@ -971,7 +971,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 "