qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] the calculation of bytes_xfer in qemu_put_buffer() is wrong
@ 2013-11-19  5:53 Wangting (Kathy)
  2013-11-19  8:19 ` Paolo Bonzini
  2013-11-20 11:27 ` [Qemu-devel] [PATCH] " Juan Quintela
  0 siblings, 2 replies; 9+ messages in thread
From: Wangting (Kathy) @ 2013-11-19  5:53 UTC (permalink / raw)
  To: qemu-devel@nongnu.org, pbonzini@redhat.com
  Cc: zhangmin (S), Luonengjun, Qinling, Chentao (Boby), Wangrui (K),
	Wubin (H)

[-- Attachment #1: Type: text/plain, Size: 743 bytes --]

In qemu_put_buffer(), bytes_xfer += size is wrong, it will be more than expected, and should be bytes_xfer += l.

Signed-off-by: zhangmin <zhangmin6@huawei.com<mailto:zhangmin6@huawei.com>>
---
savevm.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/savevm.c b/savevm.c
index 2f631d4..3f912dd 100644
--- a/savevm.c
+++ b/savevm.c
@@ -794,7 +794,7 @@ void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size)
         if (l > size)
             l = size;
         memcpy(f->buf + f->buf_index, buf, l);
-        f->bytes_xfer += size;
+        f->bytes_xfer += l;
         if (f->ops->writev_buffer) {
             add_to_iovec(f, f->buf + f->buf_index, l);
         }
--
1.7.3.1.msysgit.0

[-- Attachment #2: Type: text/html, Size: 9146 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL] migration queue
@ 2013-11-20 11:26 Juan Quintela
  2013-11-20 11:26 ` [Qemu-devel] [PATCH] The calculation of bytes_xfer in qemu_put_buffer() is wrong Juan Quintela
  0 siblings, 1 reply; 9+ messages in thread
From: Juan Quintela @ 2013-11-20 11:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

Hi Anthony

Please apply.

Brown paper bug where we are adding total size in each iteration, and not the real transmitted value.

Thanks, Juan.

The following changes since commit 394cfa39ba24dd838ace1308ae24961243947fb8:

  Merge remote-tracking branch 'quintela/migration.next' into staging (2013-11-19 13:03:06 -0800)

are available in the git repository at:


  git://github.com/juanquintela/qemu.git migration.next

for you to fetch changes up to 8e86729a0e83b557c22808a2337252c969ca3986:

  The calculation of bytes_xfer in qemu_put_buffer() is wrong (2013-11-20 12:16:04 +0100)

----------------------------------------------------------------
Wangting (Kathy) (1):
      The calculation of bytes_xfer in qemu_put_buffer() is wrong

 savevm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-20 12:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19  5:53 [Qemu-devel] [PATCH] the calculation of bytes_xfer in qemu_put_buffer() is wrong Wangting (Kathy)
2013-11-19  8:19 ` Paolo Bonzini
2013-11-19 17:55   ` [Qemu-devel] [PATCH for-1.7?] " Stefan Weil
2013-11-19 18:07     ` Paolo Bonzini
2013-11-20  5:28       ` Wangting (Kathy)
2013-11-20 10:37         ` Paolo Bonzini
2013-11-20 11:27 ` [Qemu-devel] [PATCH] " Juan Quintela
  -- strict thread matches above, loose matches on Subject: below --
2013-11-20 11:26 [Qemu-devel] [PULL] migration queue Juan Quintela
2013-11-20 11:26 ` [Qemu-devel] [PATCH] The calculation of bytes_xfer in qemu_put_buffer() is wrong Juan Quintela
2013-11-20 12:21   ` Orit Wasserman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).