[libvirt] [PATCH 1/2] Avoid blocking all APIs during incoming migration

Eric Blake eblake at redhat.com
Thu Jun 24 20:12:19 UTC 2010


On 06/24/2010 01:47 PM, Daniel P. Berrange wrote:
> During incoming migration the QEMU monitor is not able to be
> used. The incoming migration code did not keep hold of the
> job lock because migration is split across multiple API calls.
> This meant that further monitor commands on the guest would
> hang until migration finished with no timeout.
> 
> In this change the qemuDomainMigratePrepare method sets the
> job flag just before it returns. The qemuDomainMigrateFinish
> method checks for this job flag & clears it once done. This
> prevents any use of the monitor between prepare+finish steps.
> 
> The qemuDomainGetJobInfo method is also updated to refresh
> the job elapsed time. This means that virsh domjobinfo can
> return time data during incoming migration
> 
> * src/qemu/qemu_driver.c: Keep a job active during incoming
>   migration. Refresh job elapsed time when returning job info
> ---
>  src/qemu/qemu_driver.c |   80 +++++++++++++++++++++++++++++++++++++++++++++---
>  1 files changed, 75 insertions(+), 5 deletions(-)

ACK.

> +    struct timeval now;
> +
> +    if (gettimeofday(&now, NULL) < 0) {

Hmm, we probably should add gettimeofday to the list of gnulib modules,
for the sake of mingw.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100624/8da91d37/attachment-0001.sig>


More information about the libvir-list mailing list