From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VipiS-0002Xa-5v for qemu-devel@nongnu.org; Tue, 19 Nov 2013 13:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VipiM-0005c2-60 for qemu-devel@nongnu.org; Tue, 19 Nov 2013 13:08:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VipiL-0005bu-Ty for qemu-devel@nongnu.org; Tue, 19 Nov 2013 13:07:54 -0500 Message-ID: <528BA8ED.7000507@redhat.com> Date: Tue, 19 Nov 2013 19:07:41 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <528B1F0B.40001@redhat.com> <528BA5F7.4040105@weilnetz.de> In-Reply-To: <528BA5F7.4040105@weilnetz.de> 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: Stefan Weil Cc: "zhangmin (S)" , "Wangting (Kathy)" , Luonengjun , "qemu-devel@nongnu.org" , Qinling , "Chentao (Boby)" , "Wangrui (K)" , Anthony Liguori , "Wubin (H)" Il 19/11/2013 18:55, Stefan Weil ha scritto: >>> >> 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. > The committer didn't say what it fixes or whether it fixes anything. But I'd guess it is something related to block migration. In that case yes, it should be included. Paolo