]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: fix live migration failure with compression
authorLiang Li <liang.z.li@intel.com>
Tue, 9 Aug 2016 00:22:26 +0000 (08:22 +0800)
committerAmit Shah <amit.shah@redhat.com>
Thu, 11 Aug 2016 11:29:53 +0000 (16:59 +0530)
Because of commit 11808bb0c422, which remove some condition checks
of 'f->ops->writev_buffer', 'qemu_put_qemu_file' should be enhanced
to clear the 'f_src->iovcnt', or 'f_src->iovcnt' may exceed the
MAX_IOV_SIZE which will break live migration. This should be fixed.

Signed-off-by: Liang Li <liang.z.li@intel.com>
Reported-by: Jinshi Zhang <jinshi.c.zhang@intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <1470702146-24399-1-git-send-email-liang.z.li@intel.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
migration/qemu-file.c

index bbc565eb53cbe6ac4e58fd1d149d0d38e058cb0f..e9fae3115882aca356971032602304cfed580deb 100644 (file)
@@ -668,6 +668,7 @@ int qemu_put_qemu_file(QEMUFile *f_des, QEMUFile *f_src)
         len = f_src->buf_index;
         qemu_put_buffer(f_des, f_src->buf, f_src->buf_index);
         f_src->buf_index = 0;
+        f_src->iovcnt = 0;
     }
     return len;
 }