qemu_conf: Fix broken logic for adding passthrough iscsi lun

Following XML would fail :

    <disk type='network' device='lun'>
      <driver name='qemu' type='raw'/>
      <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi/1'>
        <host name='example.com' port='3260'/>
      </source>
      <target dev='sda' bus='scsi'/>
    </disk>

With the message:

error: Failed to start domain iscsilun
error: Unable to get device ID 'iqn.2013-07.com.example:iscsi/1': No such fi

Cause was commit id '1f49b05a' which added 'virDomainDiskSourceIsBlockType'
This commit is contained in:
Osier Yang 2013-08-19 08:55:24 -04:00 committed by John Ferlan
parent db1382f322
commit 109d026a16

View File

@ -1065,7 +1065,7 @@ qemuSetUnprivSGIO(virDomainDeviceDefPtr dev)
disk = dev->data.disk; disk = dev->data.disk;
if (disk->device != VIR_DOMAIN_DISK_DEVICE_LUN || if (disk->device != VIR_DOMAIN_DISK_DEVICE_LUN ||
virDomainDiskSourceIsBlockType(disk)) !virDomainDiskSourceIsBlockType(disk))
return 0; return 0;
path = disk->src; path = disk->src;