Re: [PATCH] qemu: Use atomic ops for driver->nactive

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

 



On Tue, Feb 19, 2013 at 03:13:44PM +0100, Michal Privoznik wrote:
> On 19.02.2013 14:58, Jiri Denemark wrote:
> > ---
> >  src/qemu/qemu_conf.h    |  2 +-
> >  src/qemu/qemu_process.c | 13 +++++--------
> >  2 files changed, 6 insertions(+), 9 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
> > index b5a3281..a6bd527 100644
> > --- a/src/qemu/qemu_conf.h
> > +++ b/src/qemu/qemu_conf.h
> > @@ -168,7 +168,7 @@ struct _virQEMUDriver {
> >      virCgroupPtr cgroup;
> >  
> >      /* Atomic inc/dec only */
> > -    size_t nactive;
> > +    unsigned int nactive;
> 
> Hopefully nobody gets an overflow here.

The limit on number of guests in the RPC protocol is way
lower than 2^32, so you can't get there.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]