[libvirt] [PATCH v3] Regression: Report correct CPUs present on executing virsh nodecpumap

Nitesh Konkar posted 1 patch 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1495707463-17730-1-git-send-email-niteshkonkar.libvirt@gmail.com
src/util/virhostcpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH v3] Regression: Report correct CPUs present on executing virsh nodecpumap
Posted by Nitesh Konkar 6 years, 10 months ago
On executing the virsh nodecpumap command, the number
of CPUs present was shown as (last cpu online id + 1). This
patch fixes the issue by reporting the current number of
CPUs present.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
---
 src/util/virhostcpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index aa9cfeac2..c485a9721 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -1093,7 +1093,7 @@ virHostCPUGetMap(unsigned char **cpumap,
     if (online)
         *online = virBitmapCountBits(cpus);
 
-    ret = virBitmapSize(cpus);
+    ret = virHostCPUGetCount();
 
  cleanup:
     if (ret < 0 && cpumap)
-- 
2.11.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3] Regression: Report correct CPUs present on executing virsh nodecpumap
Posted by Peter Krempa 6 years, 10 months ago
On Thu, May 25, 2017 at 15:47:43 +0530, Nitesh Konkar wrote:
> On executing the virsh nodecpumap command, the number
> of CPUs present was shown as (last cpu online id + 1). This
> patch fixes the issue by reporting the current number of
> CPUs present.

Both the summary and commit message mention virsh, while the error is in
the API.

The summary also is not in the format used by libvirt.

Also you are claiming regression but not pointing to the commit that
broke it.

It was caused by commit c67e04e25fa58104e0fae41f5b874a8067557073.

I'll push this in a while after fix the commit message.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list