]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: monitor: Don't resume lockspaces in resume event handler
authorPeter Krempa <pkrempa@redhat.com>
Wed, 14 Dec 2016 07:42:43 +0000 (08:42 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 15 Dec 2016 08:46:41 +0000 (09:46 +0100)
After qemu delivers the resume event it's already running and thus it's
too late to enter lockspaces since it may already have modified the
disk. The code only creates false log entries in the case when locking
is enabled. The lockspace needs to be acquired prior to starting cpus.

src/qemu/qemu_process.c

index 721ad6370f04177b9bde8a6353c872ea46d42616..afe3caca9570facfb292489afffd0f0a3d2db3bb 100644 (file)
@@ -774,17 +774,6 @@ qemuProcessHandleResume(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                                          VIR_DOMAIN_EVENT_RESUMED,
                                          VIR_DOMAIN_EVENT_RESUMED_UNPAUSED);
 
-        VIR_DEBUG("Using lock state '%s' on resume event", NULLSTR(priv->lockState));
-        if (virDomainLockProcessResume(driver->lockManager, cfg->uri,
-                                       vm, priv->lockState) < 0) {
-            /* Don't free priv->lockState on error, because we need
-             * to make sure we have state still present if the user
-             * tries to resume again
-             */
-            goto unlock;
-        }
-        VIR_FREE(priv->lockState);
-
         if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0) {
             VIR_WARN("Unable to save status on vm %s after state change",
                      vm->def->name);