From: Orit Wasserman <owasserm@redhat.com>
To: Juan Quintela <quintela@redhat.com>, qemu-devel@nongnu.org
Cc: aliguori@amazon.com, zhangmin <zhangmin6@huawei.com>,
"Wangting (Kathy)" <kathy.wangting@huawei.com>
Subject: Re: [Qemu-devel] [PATCH] The calculation of bytes_xfer in qemu_put_buffer() is wrong
Date: Wed, 20 Nov 2013 14:21:45 +0200 [thread overview]
Message-ID: <528CA959.2020707@redhat.com> (raw)
In-Reply-To: <1384946787-8190-2-git-send-email-quintela@redhat.com>
On 11/20/2013 01:26 PM, Juan Quintela wrote:
> From: "Wangting (Kathy)" <kathy.wangting@huawei.com>
>
> 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>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> savevm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
> }
>
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
next prev parent reply other threads:[~2013-11-20 12:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
-- strict thread matches above, loose matches on Subject: below --
2013-11-19 5:53 [Qemu-devel] [PATCH] the " Wangting (Kathy)
2013-11-19 8:19 ` Paolo Bonzini
2013-11-20 11:27 ` Juan Quintela
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=528CA959.2020707@redhat.com \
--to=owasserm@redhat.com \
--cc=aliguori@amazon.com \
--cc=kathy.wangting@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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.