aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorLiang Li <liang.z.li@intel.com>2016-08-09 08:22:26 +0800
committerAmit Shah <amit.shah@redhat.com>2016-08-11 16:59:53 +0530
commit787d134fb164e0395685744ef75829c15f5aee8d (patch)
treed6a7b271d5329e15a25da5ad9a20afd8ef82aa9c /migration
parent0e8b3cdfbc167f4bb7790ef744eaa1ac0e6959f9 (diff)
migration: fix live migration failure with compression
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>
Diffstat (limited to 'migration')
-rw-r--r--migration/qemu-file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index bbc565eb53..e9fae31158 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -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;
}