]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Don't use asyncJob after stop during snapshot revert
authorJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jun 2018 22:54:19 +0000 (18:54 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 20 Jun 2018 22:43:09 +0000 (18:43 -0400)
commit0c4408c832368b45c8246175e2a75132d3ff0302
tree4d2d00340d4b0a1b42f38ab591d76b0856969d8e
parente5d7064be02a0105b7c2f6d742c734e466eae227
qemu: Don't use asyncJob after stop during snapshot revert

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

Attempting to use the FORCE flag for snapshot-revert was resulting
in failures because qemuProcessStart and qemuProcessStartCPUs were
using QEMU_ASYNC_JOB_START after a qemuProcessStop resulting in an
error when entering the monitor:

error: internal error: unexpected async job 6 type expected 0

So create a local @jobType, initialize to QEMU_ASYNC_JOB_START, and
change to QEMU_ASYNC_JOB_NONE if we end up in the --force path
where the qemuProcessStop is run before a Start and StartCPUs.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c