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; 7+ 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] 7+ messages in thread

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

Thread overview: 7+ 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

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