[libvirt] [PATCH 5/9] Fix stream abort upon I/O failure during migration

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

 



virStreamAbort is needed when the caller wishes to terminate
the stream early, not when virStreamSend fails.

* qemu/qemu_driver.c: Fix calling of virStreamAbort during
  tunnelled migration
---
 src/qemu/qemu_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index dfbeb59..561b0c8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6616,6 +6616,7 @@ static int doTunnelMigrate(virDomainPtr dom,
     for (;;) {
         bytes = saferead(client_sock, buffer, sizeof(buffer));
         if (bytes < 0) {
+            virStreamAbort(st);
             virReportSystemError(dconn, errno, "%s",
                                  _("tunnelled migration failed to read from qemu"));
             goto close_client_sock;
@@ -6627,7 +6628,6 @@ static int doTunnelMigrate(virDomainPtr dom,
         if (virStreamSend(st, buffer, bytes) < 0) {
             qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED,
                              _("Failed to write migration data to remote libvirtd"));
-            virStreamAbort(st);
             goto close_client_sock;
         }
     }
-- 
1.6.2.5

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