]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: add a check for nodeset in qemuDomainSetNumaParamsLive
authorLuyao Huang <lhuang@redhat.com>
Fri, 14 Aug 2015 09:37:28 +0000 (17:37 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 24 Aug 2015 13:20:35 +0000 (15:20 +0200)
We will try to set the node to cpuset.mems without check if
it is available, since we already have helper to check this.
Call virNumaNodesetIsAvailable to check if node is available,
then try to change it in the cgroup.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
src/qemu/qemu_driver.c

index a90d30416058296a087dfdc65f34a1ab7d27fded..57098ee5a5117438ac317a455069318d2c62d2c5 100644 (file)
@@ -9995,6 +9995,9 @@ qemuDomainSetNumaParamsLive(virDomainObjPtr vm,
         goto cleanup;
     }
 
+    if (!virNumaNodesetIsAvailable(nodeset))
+        goto cleanup;
+
     /* Ensure the cpuset string is formatted before passing to cgroup */
     if (!(nodeset_str = virBitmapFormat(nodeset)))
         goto cleanup;