|
|
c8c376 |
From d5c66c2071bea9632a4a612ce355fca79d7d372c Mon Sep 17 00:00:00 2001
|
|
|
c8c376 |
Message-Id: <d5c66c2071bea9632a4a612ce355fca79d7d372c@dist-git>
|
|
|
c8c376 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
c8c376 |
Date: Tue, 20 Dec 2016 18:18:16 +0100
|
|
|
c8c376 |
Subject: [PATCH] qemu: snapshot: Don't attempt to resume cpus if they were not
|
|
|
c8c376 |
paused
|
|
|
c8c376 |
|
|
|
c8c376 |
External disk-only snapshots with recent enough qemu don't require
|
|
|
c8c376 |
libvirt to pause the VM. The logic determining when to resume cpus was
|
|
|
c8c376 |
slightly flawed and attempted to resume them even if they were not
|
|
|
c8c376 |
paused by the snapshot code. This normally was not a problem, but with
|
|
|
c8c376 |
locking enabled the code would attempt to acquire the lock twice.
|
|
|
c8c376 |
|
|
|
c8c376 |
The fallout of this bug would be a error from the API, but the actual
|
|
|
c8c376 |
snapshot being created. The bug was introduced with when adding support
|
|
|
c8c376 |
for external snapshots with memory (checkpoints) in commit f569b87.
|
|
|
c8c376 |
|
|
|
c8c376 |
Resolves problems described by:
|
|
|
c8c376 |
https://bugzilla.redhat.com/show_bug.cgi?id=1403691 (7.4)
|
|
|
c8c376 |
|
|
|
c8c376 |
(cherry picked from commit 4b951d1e38259ff5d03e9eedb65095eead8099e1)
|
|
|
c8c376 |
|
|
|
c8c376 |
https://bugzilla.redhat.com/show_bug.cgi?id=1406765
|
|
|
c8c376 |
---
|
|
|
c8c376 |
src/qemu/qemu_driver.c | 4 ++--
|
|
|
c8c376 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
c8c376 |
|
|
|
c8c376 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
c8c376 |
index 1e02a7f33..2e442a987 100644
|
|
|
c8c376 |
--- a/src/qemu/qemu_driver.c
|
|
|
c8c376 |
+++ b/src/qemu/qemu_driver.c
|
|
|
c8c376 |
@@ -14323,8 +14323,6 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
|
|
|
c8c376 |
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PMSUSPENDED) {
|
|
|
c8c376 |
pmsuspended = true;
|
|
|
c8c376 |
} else if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
|
|
|
c8c376 |
- resume = true;
|
|
|
c8c376 |
-
|
|
|
c8c376 |
/* For external checkpoints (those with memory), the guest
|
|
|
c8c376 |
* must pause (either by libvirt up front, or by qemu after
|
|
|
c8c376 |
* _LIVE converges). For disk-only snapshots with multiple
|
|
|
c8c376 |
@@ -14347,6 +14345,8 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
|
|
|
c8c376 |
_("guest unexpectedly quit"));
|
|
|
c8c376 |
goto cleanup;
|
|
|
c8c376 |
}
|
|
|
c8c376 |
+
|
|
|
c8c376 |
+ resume = true;
|
|
|
c8c376 |
}
|
|
|
c8c376 |
}
|
|
|
c8c376 |
|
|
|
c8c376 |
--
|
|
|
c8c376 |
2.11.0
|
|
|
c8c376 |
|