[PATCHv2 01/33] qemu: process: Refresh backing chain info when reconnecting to qemu

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

 



Refresh the disk backing chains when reconnecting to a qemu process
after daemon restart. There are a few internal fields that don't get
refreshed from the XML. Until we are able to do that, let's reload all
the metadata by the backing chain crawler.
---
 src/qemu/qemu_process.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index a83780f..4aa9ca3 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3213,6 +3213,11 @@ qemuProcessReconnect(void *opaque)
         if (qemuTranslateDiskSourcePool(conn, obj->def->disks[i]) < 0)
             goto error;

+        /* XXX we should be able to restore all data from XML in the future */
+        if (qemuDomainDetermineDiskChain(driver, obj,
+                                         obj->def->disks[i], true) < 0)
+            goto error;
+
         dev.type = VIR_DOMAIN_DEVICE_DISK;
         dev.data.disk = obj->def->disks[i];
         if (qemuAddSharedDevice(driver, &dev, obj->def->name) < 0)
-- 
1.9.3

--
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]