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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 24, 2017 at 22:05:54 +0530, Nitesh Konkar wrote:
> On Wed, May 24, 2017 at 8:09 PM, Ján Tomko <jtomko@xxxxxxxxxx> wrote:
> 
> > 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@xxxxxxxxxxxxxxxxxx>
> >> ---
> >> src/Makefile.am      |  2 ++
> >> src/util/virbitmap.c | 10 ++++++++--
> >> 2 files changed, 10 insertions(+), 2 deletions(-)

[...]

> >> @@ -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
> >
> Hi Jan,
> 
> However, currently we get the following output, which is invalid.
> 
> # virsh nodecpumap
> CPUs present:   73             <--- should be 80.
> CPUs online:    10
> CPU map:
> y-------y-------y-------y-------y-------y-------y-------y-------y-------y


Yes, that is true, but your fix is wrong.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux