All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Wangting (Kathy)" <kathy.wangting@huawei.com>
Cc: "zhangmin (S)" <zhangmin6@huawei.com>,
	Luonengjun <luonengjun@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Qinling <mail.qinling@huawei.com>,
	"Chentao (Boby)" <boby.chen@huawei.com>,
	"Wangrui (K)" <moon.wangrui@huawei.com>,
	"Wubin (H)" <wu.wubin@huawei.com>
Subject: Re: [Qemu-devel] [PATCH] the calculation of bytes_xfer in qemu_put_buffer() is wrong
Date: Tue, 19 Nov 2013 09:19:23 +0100	[thread overview]
Message-ID: <528B1F0B.40001@redhat.com> (raw)
In-Reply-To: <F5FDBD9C42529D44A051B02D2563D5205628452C@szxema505-mbx.china.huawei.com>

Il 19/11/2013 06:53, Wangting (Kathy) ha scritto:
> 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>
> ---
> 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

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2013-11-19  8:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=528B1F0B.40001@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=boby.chen@huawei.com \
    --cc=kathy.wangting@huawei.com \
    --cc=luonengjun@huawei.com \
    --cc=mail.qinling@huawei.com \
    --cc=moon.wangrui@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wu.wubin@huawei.com \
    --cc=zhangmin6@huawei.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.