From: Luyao Huang Date: Fri, 14 Aug 2015 09:37:28 +0000 (+0800) Subject: qemu: add a check for nodeset in qemuDomainSetNumaParamsLive X-Git-Tag: v1.2.19-rc1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8e5177303f1b17a5e3116c6a8693391a3539bb9;p=thirdparty%2Flibvirt.git qemu: add a check for nodeset in qemuDomainSetNumaParamsLive 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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a90d304160..57098ee5a5 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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;