[libvirt] [PATCH] qemu: add a check for nodeset in qemuDomainSetNumaParamsLive

Martin Kletzander mkletzan at redhat.com
Mon Aug 24 12:52:47 UTC 2015


On Fri, Aug 14, 2015 at 05:37:28PM +0800, Luyao Huang wrote:
>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 at redhat.com>
>---
> src/qemu/qemu_driver.c | 3 +++
> 1 file changed, 3 insertions(+)
>

ACK, will push in a while.

>diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>index fa655b5..45dfca0 100644
>--- a/src/qemu/qemu_driver.c
>+++ b/src/qemu/qemu_driver.c
>@@ -9977,6 +9977,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;
>--
>1.8.3.1
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150824/32fdf1be/attachment-0001.sig>


More information about the libvir-list mailing list