All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu list <qemu-devel@nongnu.org>,
	caoj.fnst@cn.fujitsu.com, eyakovlev@virtuozzo.com,
	den@openvz.org, liang.z.li@intel.com,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	Amit Shah <amit.shah@redhat.com>
Subject: [Qemu-devel] [PULL 2.7 3/4] migration: fix live migration failure with compression
Date: Thu, 11 Aug 2016 17:09:41 +0530	[thread overview]
Message-ID: <787d134fb164e0395685744ef75829c15f5aee8d.1470915381.git.amit.shah@redhat.com> (raw)
In-Reply-To: <cover.1470915381.git.amit.shah@redhat.com>
In-Reply-To: <cover.1470915381.git.amit.shah@redhat.com>

From: Liang Li <liang.z.li@intel.com>

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

  parent reply	other threads:[~2016-08-11 11:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 11:39 [Qemu-devel] [PULL 2.7 0/4] migration: fixes Amit Shah
2016-08-11 11:39 ` [Qemu-devel] [PULL 2.7 1/4] migration/ram: fix typo Amit Shah
2016-08-11 11:39 ` [Qemu-devel] [PULL 2.7 2/4] migration: mmap error check fix Amit Shah
2016-08-11 11:39 ` Amit Shah [this message]
2016-08-11 11:39 ` [Qemu-devel] [PULL 2.7 4/4] migration/socket: fix typo in file header Amit Shah
2016-08-11 17:54 ` [Qemu-devel] [PULL 2.7 0/4] migration: fixes Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=787d134fb164e0395685744ef75829c15f5aee8d.1470915381.git.amit.shah@redhat.com \
    --to=amit.shah@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=den@openvz.org \
    --cc=dgilbert@redhat.com \
    --cc=eyakovlev@virtuozzo.com \
    --cc=liang.z.li@intel.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.