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

Re: [libvirt] [PATCH] Do not try to cancel non-existent migration on source



On 08/16/2011 04:44 AM, Jiri Denemark wrote:
If migration failed on source daemon, the migration is automatically
canceled by the daemon itself. Thus we don't need to call
virDomainMigrateConfirm3(cancelled=1). Calling it doesn't cause any harm
but the resulting error message printed in logs may confuse people.
---
  src/libvirt.c |   41 +++++++++++++++++++++++++----------------
  1 files changed, 25 insertions(+), 16 deletions(-)

Shouldn't qemu_migration.c get the same fix, since peer2peer and tunneled migration basically re-implement the same migration driver function?

+    if (notify_source) {
+        VIR_DEBUG("Confirm3 %p ret=%d domain=%p", domain->conn, ret, domain);
+        VIR_FREE(cookiein);
+        cookiein = cookieout;
+        cookieinlen = cookieoutlen;
+        cookieout = NULL;
+        cookieoutlen = 0;
+        ret = domain->conn->driver->domainMigrateConfirm3
+            (domain, cookiein, cookieinlen,
+             flags | protection, cancelled);

And this brings us right back to Alex's question about ret being a dead store - do we need to add a VIR_WARN here based on ret, or just drop the assignment?

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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