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 <lhuang@redhat.com>
This commit is contained in:
Luyao Huang 2015-08-14 17:37:28 +08:00 committed by Martin Kletzander
parent 4d4c90dfd5
commit c8e5177303

View 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;