From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXoLu-0006nu-Hs for qemu-devel@nongnu.org; Thu, 11 Aug 2016 07:40:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXoLo-0001ib-V8 for qemu-devel@nongnu.org; Thu, 11 Aug 2016 07:40:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXoLo-0001iX-P9 for qemu-devel@nongnu.org; Thu, 11 Aug 2016 07:40:40 -0400 From: Amit Shah Date: Thu, 11 Aug 2016 17:09:41 +0530 Message-Id: <787d134fb164e0395685744ef75829c15f5aee8d.1470915381.git.amit.shah@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PULL 2.7 3/4] migration: fix live migration failure with compression List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu list , caoj.fnst@cn.fujitsu.com, eyakovlev@virtuozzo.com, den@openvz.org, liang.z.li@intel.com, "Dr. David Alan Gilbert" , Juan Quintela , Amit Shah From: Liang Li 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 Reported-by: Jinshi Zhang Reviewed-by: Dr. David Alan Gilbert Message-Id: <1470702146-24399-1-git-send-email-liang.z.li@intel.com> Signed-off-by: Amit Shah --- migration/qemu-file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index bbc565e..e9fae31 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; } -- 2.7.4