[PATCH 4/6] qemu: Update shared disk table when reconnecting qemu process

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

 



---
 src/qemu/qemu_process.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index f46bc62..e521228 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3254,6 +3254,7 @@ qemuProcessReconnect(void *opaque)
     int reason;
     virQEMUDriverConfigPtr cfg;
     virCapsPtr caps = NULL;
+    int i;
 
     memcpy(&oldjob, &data->oldjob, sizeof(oldjob));
 
@@ -3296,6 +3297,15 @@ qemuProcessReconnect(void *opaque)
     if (qemuUpdateActiveUsbHostdevs(driver, obj->def) < 0)
         goto error;
 
+    /* XXX: Need to change as long as lock is introduced for
+     * qemu_driver->sharedDisks.
+     */
+    for (i = 0; i < obj->def->ndisks; i++) {
+        if (qemuAddSharedDisk(driver, obj->def->disks[i],
+                              obj->def->name) < 0)
+            goto error;
+    }
+
     if (qemuProcessUpdateState(driver, obj) < 0)
         goto error;
 
-- 
1.7.7.6

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