Re: [Qemu-devel] [PATCH] block: Produce zeros when protocols reading beyond end of file

2013-08-19 Thread Stefan Hajnoczi
On Mon, Aug 19, 2013 at 02:36:14PM +0800, Asias He wrote: > On Fri, Aug 16, 2013 at 10:41:36AM +0200, Stefan Hajnoczi wrote: > > On Mon, Aug 5, 2013 at 10:11 AM, Asias He wrote: > > A simple but ugly way to fix this is for block.c to also have a > > ->zero_beyond_eof flag which enables the behavio

Re: [Qemu-devel] [PATCH] block: Produce zeros when protocols reading beyond end of file

2013-08-18 Thread Asias He
On Fri, Aug 16, 2013 at 10:41:36AM +0200, Stefan Hajnoczi wrote: > On Mon, Aug 5, 2013 at 10:11 AM, Asias He wrote: > > From: MORITA Kazutaka > > > > While Asias is debugging an issue creating qcow2 images on top of > > non-file protocols. It boils down to this example using NBD: > > > > $ qemu-

Re: [Qemu-devel] [PATCH] block: Produce zeros when protocols reading beyond end of file

2013-08-16 Thread Stefan Hajnoczi
On Mon, Aug 5, 2013 at 10:11 AM, Asias He wrote: > From: MORITA Kazutaka > > While Asias is debugging an issue creating qcow2 images on top of > non-file protocols. It boils down to this example using NBD: > > $ qemu-io -c 'open -g nbd+unix:///?socket=/tmp/nbd.sock' -c 'read -v 0 512' > > Notice

Re: [Qemu-devel] [PATCH] block: Produce zeros when protocols reading beyond end of file

2013-08-05 Thread Kevin Wolf
Am 05.08.2013 um 10:11 hat Asias He geschrieben: > From: MORITA Kazutaka > > While Asias is debugging an issue creating qcow2 images on top of > non-file protocols. It boils down to this example using NBD: > > $ qemu-io -c 'open -g nbd+unix:///?socket=/tmp/nbd.sock' -c 'read -v 0 512' > > Noti

[Qemu-devel] [PATCH] block: Produce zeros when protocols reading beyond end of file

2013-08-05 Thread Asias He
From: MORITA Kazutaka While Asias is debugging an issue creating qcow2 images on top of non-file protocols. It boils down to this example using NBD: $ qemu-io -c 'open -g nbd+unix:///?socket=/tmp/nbd.sock' -c 'read -v 0 512' Notice the open -g option to set bs->growable. This means you can re