Re: [PATCH 4/5] qemu: reuse qemuMigrationIsAllowed when doing save and managedsave

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

 



On 12/11/12 17:18, Eric Blake wrote:
On 12/07/2012 04:30 AM, Peter Krempa wrote:
Save and managedsave use both migration to file. This patch reuses

s/use both/both use/

qemuMigrationIsAllowed to check if the migration could happen before
trying.
---
  src/qemu/qemu_driver.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

ACK.


diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 4423e69..7e19cdc 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3010,11 +3010,9 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
                         "%s", _("domain is marked for auto destroy"));
          goto cleanup;

Now as patch 2/5 has the autodestroy check unconditional, so the check is redundant here. I squashed in the changes from 5/5 getting rid of this one instance here without changing semantics.

      }
-    if (virDomainHasDiskMirror(vm)) {
-        virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s",
-                       _("domain has active block copy job"));
+
+    if (!qemuMigrationIsAllowed(driver, vm, vm->def, false))
          goto cleanup;
-    }

      if (qemuDomainObjBeginAsyncJobWithDriver(driver, vm,
                                               QEMU_ASYNC_JOB_SAVE) < 0)



and pushed the patch.

Thanks for the review.

Peter

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