|
|
edecca |
From 057c1927b6d652591931d1cf2bc0217834b30e12 Mon Sep 17 00:00:00 2001
|
|
|
edecca |
Message-Id: <057c1927b6d652591931d1cf2bc0217834b30e12@dist-git>
|
|
|
edecca |
From: John Ferlan <jferlan@redhat.com>
|
|
|
edecca |
Date: Fri, 11 Jan 2019 09:15:38 -0500
|
|
|
edecca |
Subject: [PATCH] qemu: Filter non SCSI hostdevs in
|
|
|
edecca |
qemuHostdevPrepareSCSIDevices
|
|
|
edecca |
MIME-Version: 1.0
|
|
|
edecca |
Content-Type: text/plain; charset=UTF-8
|
|
|
edecca |
Content-Transfer-Encoding: 8bit
|
|
|
edecca |
|
|
|
edecca |
https://bugzilla.redhat.com/show_bug.cgi?id=1665244
|
|
|
edecca |
|
|
|
edecca |
When commit 1d94b3e7 added code to walk the [n]hostdevs list looking
|
|
|
edecca |
to add shared hostdevs, it should've filtered any hostdevs that were
|
|
|
edecca |
not SCSI hostdev's.
|
|
|
edecca |
|
|
|
edecca |
Signed-off-by: John Ferlan <jferlan@redhat.com>
|
|
|
edecca |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
edecca |
(cherry picked from commit f30ac207ad96a567ade0d8a49023ade9233b2b72)
|
|
|
edecca |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
edecca |
---
|
|
|
edecca |
src/qemu/qemu_hostdev.c | 3 +++
|
|
|
edecca |
1 file changed, 3 insertions(+)
|
|
|
edecca |
|
|
|
edecca |
diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
|
|
|
edecca |
index 1e040f98b7..8b1ad6b447 100644
|
|
|
edecca |
--- a/src/qemu/qemu_hostdev.c
|
|
|
edecca |
+++ b/src/qemu/qemu_hostdev.c
|
|
|
edecca |
@@ -278,6 +278,9 @@ qemuHostdevPrepareSCSIDevices(virQEMUDriverPtr driver,
|
|
|
edecca |
for (i = 0; i < nhostdevs; i++) {
|
|
|
edecca |
virDomainDeviceDef dev;
|
|
|
edecca |
|
|
|
edecca |
+ if (!virHostdevIsSCSIDevice(hostdevs[i]))
|
|
|
edecca |
+ continue;
|
|
|
edecca |
+
|
|
|
edecca |
dev.type = VIR_DOMAIN_DEVICE_HOSTDEV;
|
|
|
edecca |
dev.data.hostdev = hostdevs[i];
|
|
|
edecca |
|
|
|
edecca |
--
|
|
|
edecca |
2.20.1
|
|
|
edecca |
|