[libvirt] [PATCH] qemu: Fix event generated for qemuDomainRevertToSnapshot (pause->run)

John Ferlan jferlan at redhat.com
Thu Dec 17 13:23:54 UTC 2015


[...]
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index 783a7cd..deeffc1 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -15549,7 +15549,7 @@
>> qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
>>                 event = virDomainEventLifecycleNewFromObj(vm,
>>                                                 
>> VIR_DOMAIN_EVENT_STARTED,
>>                                                  detail);
>> -            } else if (was_running) {
>> +            } else if (!was_running) {
>>                 /* Transition 8 */
> 
> Transition 8 really is paused->running and was_running is set to true
> only if the domain state is _RUNNING.  And the variable is used only
> here, so if I read them correctly, this should be fixed.  But I must
> say, that snapshot restoring logic... is nasty.
> 
> ACK.
> 

I agree - thankfully documented well enough with those "Transition *"
comments in order to help follow the logic...

Now pushed -

Tks,

John




More information about the libvir-list mailing list