Re: [libvirt] [PATCH] [3/4] Implement managed save operations for qemu driver

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

 



On 04/01/2010 12:22 PM, Daniel Veillard wrote:
@@ -5928,6 +6096,29 @@ static int qemudDomainStart(virDomainPtr dom) {
          goto endjob;
      }

+    /*
+     * If there is a managed saved state restore it instead of starting
+     * from scratch. In any case the old state is removed.
+     */
+    managed_save = qemuDomainManagedSavePath(driver, vm);
+    if ((managed_save)&&  (virFileExists(managed_save))) {
+        virDomainObjUnlock(vm);
+        qemuDriverUnlock(driver);
+        ret = qemudDomainRestore(dom->conn, managed_save);

There is problem here.

qemudDomainRestore will call qemuDomainObjBeginJobWithDriver, which was already called just above this bit of code in qemudDomainStart. The result will be a temporary deadlock, while the semaphore wait times out, followed by failure.

Either qemudDomainStart needs to call that function later, or else it needs to call qemuDomainObjEndJob before calling qemudDomainRestore.

(Unfortunately, I haven't yet had the time to do any more of a review other than build and try running the code.)

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