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

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

 



On 2013年02月19日 21:58, Daniel P. Berrange wrote:
On Tue, Feb 19, 2013 at 08:27:43PM +0800, Osier Yang wrote:
---
  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 69e4209..6466a79 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3188,6 +3188,7 @@ qemuProcessReconnect(void *opaque)
      int reason;
      virQEMUDriverConfigPtr cfg;
      virCapsPtr caps = NULL;
+    int i;

s/int/size_t/


      memcpy(&oldjob,&data->oldjob, sizeof(oldjob));

@@ -3229,6 +3230,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.

Not sure I understand what this comment is refering to ?

It refers to:

    /* Immutable pointer. Unsafe APIs. XXX */
    virHashTablePtr sharedDisks

+     */
+    for (i = 0; i<  obj->def->ndisks; i++) {
+        if (qemuAddSharedDisk(driver, obj->def->disks[i],
+                              obj->def->name)<  0)
+            goto error;
+    }
+

ACK if comment is clarified

Daniel

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