* [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; 6+ 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] 6+ messages in thread
* [Qemu-devel] [PATCH] The calculation of bytes_xfer in qemu_put_buffer() is wrong
2013-11-20 11:26 [Qemu-devel] [PULL] migration queue Juan Quintela
@ 2013-11-20 11:26 ` Juan Quintela
2013-11-20 12:21 ` Orit Wasserman
0 siblings, 1 reply; 6+ messages in thread
From: Juan Quintela @ 2013-11-20 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: zhangmin, aliguori, Wangting (Kathy)
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);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] The calculation of bytes_xfer in qemu_put_buffer() is wrong
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
0 siblings, 0 replies; 6+ messages in thread
From: Orit Wasserman @ 2013-11-20 12:21 UTC (permalink / raw)
To: Juan Quintela, qemu-devel; +Cc: aliguori, zhangmin, Wangting (Kathy)
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [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 ` Juan Quintela
0 siblings, 2 replies; 6+ 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] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] the calculation of bytes_xfer in qemu_put_buffer() is wrong
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
1 sibling, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2013-11-19 8:19 UTC (permalink / raw)
To: Wangting (Kathy)
Cc: zhangmin (S), Luonengjun, qemu-devel@nongnu.org, Qinling,
Chentao (Boby), Wangrui (K), Wubin (H)
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] the calculation of bytes_xfer in qemu_put_buffer() is wrong
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
1 sibling, 0 replies; 6+ messages in thread
From: Juan Quintela @ 2013-11-20 11:27 UTC (permalink / raw)
To: Wangting (Kathy)
Cc: zhangmin (S), Luonengjun, qemu-devel@nongnu.org, Qinling,
Chentao (Boby), Wangrui (K), pbonzini@redhat.com, Wubin (H)
"Wangting (Kathy)" <kathy.wangting@huawei.com> wrote:
> 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>
>
Good spot.
Applied and sent pull request to Anthony.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-20 12:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- 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
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).