[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 2/2] Reload snapshots on SIGHUP



On receiving SIGHUP, libvirtd currently only reloads all persistent
configs for qemu domains, but fails to reload the associated snapshot
data.

Copy code from qemudStartup() to qemudReload() to iterate over all
domains and call qemuDomainSnapshotLoad() for every domain.

Signed-off-by: Philipp Hahn <hahn univention de>
---
This depends on commits 9e093f0b4cc5a5fc455a4893d73dc0f2c5355161 to fix
SIGHUP and on 839a5295ef568727b025f9546c1720279f49fe62 to fix a memory
leak.
---
 src/qemu/qemu_driver.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c8dda73..fcb56ac 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -702,6 +702,9 @@ qemudReload(void) {
                             qemu_driver->autostartDir,
                             0, QEMU_EXPECTED_VIRT_TYPES,
                             qemudNotifyLoadDomain, qemu_driver);
+
+    virHashForEach(qemu_driver->domains.objs, qemuDomainSnapshotLoad,
+                   qemu_driver->snapshotDir);
     qemuDriverUnlock(qemu_driver);
 
     qemuAutostartDomains(qemu_driver);
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]