Re: [PATCH v3 3/3] qemu: check presence of each disk and its backing file as well

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

 



On 07/31/2013 04:49 PM, Martin Kletzander wrote:
On 07/30/2013 08:26 AM, Guannan Ren wrote:
For disk with startupPolicy support, such as cdrom and floppy
when its chain is broken, the startup policy will apply,
otherwise, report an error.
---
  src/qemu/qemu_domain.c  | 31 +++++++++++++------------------
  src/qemu/qemu_process.c |  6 ------
  2 files changed, 13 insertions(+), 24 deletions(-)


And rewrite this to one condition.

So basically ACK with this squashed in:

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 1e75adb..c54f9f6 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2056,7 +2056,6 @@ qemuDomainCheckDiskStartupPolicy(virQEMUDriverPtr
driver,
              break;
      }

-    virResetLastError();
      VIR_DEBUG("Dropping disk '%s' on domain '%s' (UUID '%s') "
                "due to inaccessible source '%s'",
                disk->dst, vm->def->name, uuid, disk->src);
@@ -2095,10 +2094,11 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
              qemuDiskChainCheckBroken(disk) >= 0)
                  continue;

-        if (disk->startupPolicy) {
-            if (qemuDomainCheckDiskStartupPolicy(driver, vm, disk,
-                                                 cold_boot) >= 0)
-                continue;
+        if (disk->startupPolicy &&
+            qemuDomainCheckDiskStartupPolicy(driver, vm, disk,
+                                             cold_boot) >= 0) {
+            virResetLastError();
+            continue;
          }

          goto cleanup;
--

Martin

Thanks for the review. pushed.

Guannan

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