[PATCH 2/2] Reload snapshots on SIGHUP

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

 



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@xxxxxxxxxxxxx>
---
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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]