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

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

 



On 11/08/12 17:21, Eric Blake wrote:
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.

ACK.


I removed the extra parentheses and pushed the patch. Thanks for the review.

Peter

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