Received: from eggs.gnu.org ([2001:4830:134:3::10]:40223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCh78-0000Cg-V7 for qemu-devel@nongnu.org; Thu, 22 Aug 2013 22:28:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCh71-0002ff-Aq for qemu-devel@nongnu.org; Thu, 22 Aug 2013 22:28:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCh71-0002cO-2j for qemu-devel@nongnu.org; Thu, 22 Aug 2013 22:28:31 -0400 Date: Fri, 23 Aug 2013 10:28:22 +0800 From: Asias He Message-ID: <20130823022822.GA4035@hj.localdomain> References: <20130821154408.GC18303@stefanha-thinkpad.redhat.com> <1377156254-14377-1-git-send-email-asias@redhat.com> <20130822121229.GF27613@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130822121229.GF27613@stefanha-thinkpad.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: Stefan Hajnoczi Cc: Kevin Wolf , Stefan Hajnoczi , qemu-devel@nongnu.org, MORITA Kazutaka , Bharata B Rao On Thu, Aug 22, 2013 at 02:12:29PM +0200, Stefan Hajnoczi wrote: > 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. Thanks! > Stefan -- Asias