On Wed, Jul 08, 2015 at 19:36:06 +0200, Jiri Denemark wrote: > For quite a long time we don't need to postpone queueing events until > the end of the function since we no longer have the big driver lock. > Let's make the code of qemuMigrationFinish simpler by queuing events at > the time we generate them. > > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> > --- > src/qemu/qemu_migration.c | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > index ae7433e..cc7754c 100644 > --- a/src/qemu/qemu_migration.c > +++ b/src/qemu/qemu_migration.c ... > @@ -5709,16 +5708,17 @@ qemuMigrationFinish(virQEMUDriverPtr driver, > > dom = virGetDomain(dconn, vm->def->name, vm->def->uuid); > > - event = virDomainEventLifecycleNewFromObj(vm, > - VIR_DOMAIN_EVENT_RESUMED, > - VIR_DOMAIN_EVENT_RESUMED_MIGRATED); > + qemuDomainEventQueue(driver, > + virDomainEventLifecycleNewFromObj(vm, > + VIR_DOMAIN_EVENT_RESUMED, > + VIR_DOMAIN_EVENT_RESUMED_MIGRATED)); I dislike this formatting. > if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PAUSED) { > virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, > VIR_DOMAIN_PAUSED_USER); > - qemuDomainEventQueue(driver, event); > - event = virDomainEventLifecycleNewFromObj(vm, > - VIR_DOMAIN_EVENT_SUSPENDED, > - VIR_DOMAIN_EVENT_SUSPENDED_PAUSED); > + qemuDomainEventQueue(driver, > + virDomainEventLifecycleNewFromObj(vm, > + VIR_DOMAIN_EVENT_SUSPENDED, > + VIR_DOMAIN_EVENT_SUSPENDED_PAUSED)); > } > > if (virDomainObjIsActive(vm) && ACK, Peter
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list