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

Re: [libvirt] [PATCH] qemu: Fix domain ID numbering race condition

On 11/08/2012 06:09 AM, Peter Krempa wrote:
> When the libvirt daemon is restarted it tries to reconnect to running
> qemu domains. Since commit d38897a5d4b1880e1998394b2a37bba979bbdff1 the
> re-connection code runs in separate threads. In the original
> implementation the maximum of domain ID's (that is used as an
> initializer for numbering guests created next) while libvirt was
> reconnecting to the guest.

> +    /* find the maximum ID from active and transient configs to initialize
> +     * the driver with. This is to avoid race between autostart and reconnect
> +     * threads */
> +    virHashForEach(qemu_driver->domains.objs,
> +                   qemuDomainFindMaxID,
> +                   &(qemu_driver->nextvmid));

Spurious parens; this can be just &qemu_driver->nextvmid.


Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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