From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VipWJ-0005Pi-0e for qemu-devel@nongnu.org; Tue, 19 Nov 2013 12:55:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VipWC-0001WR-7B for qemu-devel@nongnu.org; Tue, 19 Nov 2013 12:55:26 -0500 Received: from v220110690675601.yourvserver.net ([37.221.199.173]:52897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VipWC-0001W4-2E for qemu-devel@nongnu.org; Tue, 19 Nov 2013 12:55:20 -0500 Message-ID: <528BA5F7.4040105@weilnetz.de> Date: Tue, 19 Nov 2013 18:55:03 +0100 From: Stefan Weil MIME-Version: 1.0 References: <528B1F0B.40001@redhat.com> In-Reply-To: <528B1F0B.40001@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-1.7?] the calculation of bytes_xfer in qemu_put_buffer() is wrong List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , "Wangting (Kathy)" Cc: "zhangmin (S)" , Luonengjun , "qemu-devel@nongnu.org" , Qinling , "Chentao (Boby)" , "Wangrui (K)" , Anthony Liguori , "Wubin (H)" Am 19.11.2013 09:19, schrieb Paolo Bonzini: > 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 >> --- >> 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 Should this patch be included in QEMU 1.7? It's obviously a bug fix, so I assume yes.