9119d9
From 58fb8449e8c7d580c48f85b49993bf0a034e94f3 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <58fb8449e8c7d580c48f85b49993bf0a034e94f3@dist-git>
9119d9
From: John Ferlan <jferlan@redhat.com>
9119d9
Date: Thu, 18 Sep 2014 09:29:58 -0400
9119d9
Subject: [PATCH] qemu: Fix iothreads issue
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1101574
9119d9
9119d9
If there are no iothreads, then return from qemuProcessDetectIOThreadPIDs
9119d9
without error; otherwise, the following occurs:
9119d9
9119d9
error: Failed to start domain $dom
9119d9
error: An error occurred, but the cause is unknown
9119d9
(cherry picked from commit b66c950fb9d5dc0e786cdf4ebe7e206cd5d7001c)
9119d9
Signed-off-by: John Ferlan <jferlan@redhat.com>
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/qemu/qemu_process.c | 6 +++++-
9119d9
 1 file changed, 5 insertions(+), 1 deletion(-)
9119d9
9119d9
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
9119d9
index ed73ae5..274fc1b 100644
9119d9
--- a/src/qemu/qemu_process.c
9119d9
+++ b/src/qemu/qemu_process.c
9119d9
@@ -2109,9 +2109,13 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver,
9119d9
         goto cleanup;
9119d9
     niothreads = qemuMonitorGetIOThreads(priv->mon, &iothreads);
9119d9
     qemuDomainObjExitMonitor(driver, vm);
9119d9
-    if (niothreads <= 0)
9119d9
+    if (niothreads < 0)
9119d9
         goto cleanup;
9119d9
 
9119d9
+    /* Nothing to do */
9119d9
+    if (niothreads == 0)
9119d9
+        return 0;
9119d9
+
9119d9
     if (niothreads != vm->def->iothreads) {
9119d9
         virReportError(VIR_ERR_INTERNAL_ERROR,
9119d9
                        _("got wrong number of IOThread pids from QEMU monitor. "
9119d9
-- 
9119d9
2.1.0
9119d9