From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCTkj-00022N-Np for qemu-devel@nongnu.org; Thu, 22 Aug 2013 08:12:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCTke-0002wS-DJ for qemu-devel@nongnu.org; Thu, 22 Aug 2013 08:12:37 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:36707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCTke-0002wN-7e for qemu-devel@nongnu.org; Thu, 22 Aug 2013 08:12:32 -0400 Received: by mail-ee0-f45.google.com with SMTP id c50so868671eek.32 for ; Thu, 22 Aug 2013 05:12:31 -0700 (PDT) Date: Thu, 22 Aug 2013 14:12:29 +0200 From: Stefan Hajnoczi Message-ID: <20130822121229.GF27613@stefanha-thinkpad.redhat.com> References: <20130821154408.GC18303@stefanha-thinkpad.redhat.com> <1377156254-14377-1-git-send-email-asias@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1377156254-14377-1-git-send-email-asias@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] block: Introduce bs->zero_beyond_eof List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Asias He Cc: Kevin Wolf , Stefan Hajnoczi , qemu-devel@nongnu.org, MORITA Kazutaka , Bharata B Rao On Thu, Aug 22, 2013 at 03:24:14PM +0800, Asias He wrote: > In 4146b46c42e0989cb5842e04d88ab6ccb1713a48 (block: Produce zeros when > protocols reading beyond end of file), we break qemu-iotests ./check > -qcow2 022. This happens because qcow2 temporarily sets ->growable = 1 > for vmstate accesses (which are stored beyond the end of regular image > data). > > We introduce the bs->zero_beyond_eof to allow qcow2_load_vmstate() to > disable ->zero_beyond_eof temporarily in addition to enable ->growable. > > Suggested-by: Stefan Hajnoczi > Signed-off-by: Asias He > --- > Changes in v2: Set bs->zero_beyond_eof in bdrv_open_common > > block.c | 4 +++- > block/qcow2.c | 3 +++ > include/block/block_int.h | 3 +++ > 3 files changed, 9 insertions(+), 1 deletion(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block ...with a little twist: since the broken patch hasn't been merged yet I'm applying this fix *first* to keep the tree bisectable. Stefan