Blame SOURCES/libvirt-qemu-Fix-call-in-qemuDomainSetNumaParamsLive-for-virCgroupNewIOThread.patch

9119d9
From f48bbd58f075b118369898c44687c2c67c791998 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <f48bbd58f075b118369898c44687c2c67c791998@dist-git>
9119d9
From: John Ferlan <jferlan@redhat.com>
9119d9
Date: Thu, 18 Sep 2014 09:30:00 -0400
9119d9
Subject: [PATCH] qemu: Fix call in qemuDomainSetNumaParamsLive for
9119d9
 virCgroupNewIOThread
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1101574
9119d9
9119d9
Found by inspection of the "i+1" change.  IOThreads are numbered 1..n
9119d9
thus the virCgroupNewIOThread needs to create a 1..n value not 0 based.
9119d9
9119d9
(cherry picked from commit 82494cd628eedd4c698a7f11a4001c586107c198)
9119d9
Signed-off-by: John Ferlan <jferlan@redhat.com>
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/qemu/qemu_driver.c | 3 ++-
9119d9
 1 file changed, 2 insertions(+), 1 deletion(-)
9119d9
9119d9
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
9119d9
index a1379c2..f914081 100644
9119d9
--- a/src/qemu/qemu_driver.c
9119d9
+++ b/src/qemu/qemu_driver.c
9119d9
@@ -8767,7 +8767,8 @@ qemuDomainSetNumaParamsLive(virDomainObjPtr vm,
9119d9
         goto cleanup;
9119d9
 
9119d9
     for (i = 0; i < priv->niothreadpids; i++) {
9119d9
-        if (virCgroupNewIOThread(priv->cgroup, i, false, &cgroup_temp) < 0 ||
9119d9
+        if (virCgroupNewIOThread(priv->cgroup, i + 1, false,
9119d9
+                                 &cgroup_temp) < 0 ||
9119d9
             virCgroupSetCpusetMems(cgroup_temp, nodeset_str) < 0)
9119d9
             goto cleanup;
9119d9
         virCgroupFree(&cgroup_temp);
9119d9
-- 
9119d9
2.1.0
9119d9