From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN1tp-0000P3-DC for qemu-devel@nongnu.org; Fri, 20 Sep 2013 10:41:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN1tj-0007ac-UF for qemu-devel@nongnu.org; Fri, 20 Sep 2013 10:41:37 -0400 Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:36921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN1tj-0007aO-NJ for qemu-devel@nongnu.org; Fri, 20 Sep 2013 10:41:31 -0400 Received: by mail-ea0-f174.google.com with SMTP id z15so311796ead.19 for ; Fri, 20 Sep 2013 07:41:30 -0700 (PDT) Date: Fri, 20 Sep 2013 16:41:28 +0200 From: Stefan Hajnoczi Message-ID: <20130920144128.GA19667@stefanha-thinkpad.redhat.com> References: <1379502855-27759-1-git-send-email-famz@redhat.com> <1379502855-27759-2-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1379502855-27759-2-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] block: don't lose data from last incomplete sector List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, asias@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Wed, Sep 18, 2013 at 07:14:14PM +0800, Fam Zheng wrote: > To read the last sector that is not aligned to sector boundary, current > code for growable backends, since commit 893a8f6 "block: Produce zeros > when protocols reading beyond end of file", drops the data and directly > returns zeroes. That is incorrect. > > Signed-off-by: Fam Zheng > --- > block.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I merged this patch because I hit the problem myself today. And my code includes a test case which will be posted soon. So don't worry about writing a test case for this patch. I still don't fully understand the vmdk patch and would like a test case for it. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan