From 9b8bdf3b99fed3cea29886a6c309a67e6e53924e Mon Sep 17 00:00:00 2001
Message-Id: <9b8bdf3b99fed3cea29886a6c309a67e6e53924e.1377873641.git.jdenemar@redhat.com>
From: Osier Yang <jyang@redhat.com>
Date: Thu, 22 Aug 2013 16:56:24 -0400
Subject: [PATCH] qemu_conf: Fix broken logic for adding passthrough iscsi lun
https://bugzilla.redhat.com/show_bug.cgi?id=1000159
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'
(cherry picked from commit 109d026a16bcb9f315dbeb665916bad718480957)
---
src/qemu/qemu_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 18e926c..86ed9ed 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1065,7 +1065,7 @@ qemuSetUnprivSGIO(virDomainDeviceDefPtr dev)
disk = dev->data.disk;
if (disk->device != VIR_DOMAIN_DISK_DEVICE_LUN ||
- virDomainDiskSourceIsBlockType(disk))
+ !virDomainDiskSourceIsBlockType(disk))
return 0;
path = disk->src;
--
1.8.3.2