Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof

2013-08-22 Thread Asias He
On Wed, Aug 21, 2013 at 05:44:08PM +0200, Stefan Hajnoczi wrote: > On Wed, Aug 21, 2013 at 04:26:04PM +0800, Asias He wrote: > > @@ -868,6 +868,7 @@ int bdrv_file_open(BlockDriverState **pbs, const char > > *filename, > > QDECREF(options); > > > > bs->growable = 1; > > +bs->zero_be

Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof

2013-08-21 Thread Stefan Hajnoczi
On Wed, Aug 21, 2013 at 04:26:04PM +0800, Asias He wrote: > @@ -868,6 +868,7 @@ int bdrv_file_open(BlockDriverState **pbs, const char > *filename, > QDECREF(options); > > bs->growable = 1; > +bs->zero_beyond_eof = true; > *pbs = bs; > return 0; > > @@ -978,6 +979,7 @@ i

[Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof

2013-08-21 Thread Asias He
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 introd