]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix a race when computing migration downtime
authorJiri Denemark <jdenemar@redhat.com>
Tue, 23 Feb 2016 09:47:01 +0000 (10:47 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 8 Mar 2016 15:26:00 +0000 (16:26 +0100)
commitcb483a68fdc3503efc9b0996570e58aaf0c11c17
treee1cd37398e52c8c0165b2c13269ac01bf3b5c97e
parent315808e99ec09d3894e79007728a70d891b5e02e
qemu: Fix a race when computing migration downtime

Computing a total downtime during a migration requires us to store a
time stamp when guest CPUs get stopped. The value (and all other
statistics) is then transferred to the destination to compute the
downtime. Because the stopped time stamp is stored by a STOP event
handler while the statistics which will be sent over to the destination
are copied synchronously within qemuMigrationWaitForCompletion.

Depending on the timing of STOP and MIGRATION events, we may end up
copying (and transferring) statistics without the stopped time stamp
set. Let's make sure we always use the correct time stamp.

https://bugzilla.redhat.com/show_bug.cgi?id=1282744

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_migration.c