[libvirt] [PATCH] Regression: Report correct CPUs present on executing virsh nodecpumap
Ján Tomko
jtomko at redhat.com
Wed May 24 14:39:43 UTC 2017
On Wed, May 24, 2017 at 07:46:00PM +0530, Nitesh Konkar wrote:
>Recent changes to virbitmap.c file created a regression
>where on executing the virsh nodecpumap command, the number
>of CPUs present was shown as (last cpu online id + 1). This
>patch fixes the issue.
>
>Signed-off-by: Nitesh Konkar <nitkon12 at linux.vnet.ibm.com>
>---
> src/Makefile.am | 2 ++
> src/util/virbitmap.c | 10 ++++++++--
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
>diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
>index eac63d997..dc427f430 100644
>--- a/src/util/virbitmap.c
>+++ b/src/util/virbitmap.c
>@@ -37,6 +37,7 @@
> #include "count-one-bits.h"
> #include "virstring.h"
> #include "virerror.h"
>+#include "virhostcpu.h"
>
> #define VIR_FROM_THIS VIR_FROM_NONE
>
>@@ -565,9 +566,14 @@ virBitmapParseUnlimited(const char *str)
> const char *cur = str;
> char *tmp;
> size_t i;
>- int start, last;
>+ int start, last, bitmapSize;
>+
>+ bitmapSize = virHostCPUGetCount();
NACK.
This function should be able to parse any bitmap, regardless of how many
CPUs the host has.
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170524/72dcdae5/attachment-0001.sig>
More information about the libvir-list
mailing list