Re: [Qemu-devel] [PATCH] block/stream: Don't stream unbacked devices

2013-11-15 Thread Stefan Hajnoczi
On Thu, Nov 14, 2013 at 03:07:09PM +0100, Paolo Bonzini wrote: > Il 14/11/2013 14:41, Stefan Hajnoczi ha scritto: > But such a no-op streaming is valid, just like it is valid to > enable copy-on-read without a backing file. Think of a system that > starts streaming a disk as soon as the VM starts,

Re: [Qemu-devel] [PATCH] block/stream: Don't stream unbacked devices

2013-11-14 Thread Paolo Bonzini
Il 14/11/2013 14:41, Stefan Hajnoczi ha scritto: > Thanks for raising this, it's a bug that we don't verify that the image > has a backing file. > > I'd rather return an error that the user attempted to do something > pointless. It was a mistake on their part and it helps to bring this to > their

Re: [Qemu-devel] [PATCH] block/stream: Don't stream unbacked devices

2013-11-14 Thread Eric Blake
On 11/14/2013 06:41 AM, Stefan Hajnoczi wrote: > On Wed, Nov 13, 2013 at 08:37:58PM +0100, Max Reitz wrote: >> If a block device is unbacked, a streaming blockjob should immediately >> finish instead of beginning to try to stream, then noticing the backing >> file does not contain even the first se

Re: [Qemu-devel] [PATCH] block/stream: Don't stream unbacked devices

2013-11-14 Thread Stefan Hajnoczi
On Wed, Nov 13, 2013 at 08:37:58PM +0100, Max Reitz wrote: > If a block device is unbacked, a streaming blockjob should immediately > finish instead of beginning to try to stream, then noticing the backing > file does not contain even the first sector (since it does not exist) > and then finishing

Re: [Qemu-devel] [PATCH] block/stream: Don't stream unbacked devices

2013-11-14 Thread Kevin Wolf
Am 13.11.2013 um 20:37 hat Max Reitz geschrieben: > If a block device is unbacked, a streaming blockjob should immediately > finish instead of beginning to try to stream, then noticing the backing > file does not contain even the first sector (since it does not exist) > and then finishing normally.

Re: [Qemu-devel] [PATCH] block/stream: Don't stream unbacked devices

2013-11-13 Thread Wenchao Xia
于 2013/11/14 3:37, Max Reitz 写道: > If a block device is unbacked, a streaming blockjob should immediately > finish instead of beginning to try to stream, then noticing the backing > file does not contain even the first sector (since it does not exist) > and then finishing normally. > > Signed-off-

[Qemu-devel] [PATCH] block/stream: Don't stream unbacked devices

2013-11-13 Thread Max Reitz
If a block device is unbacked, a streaming blockjob should immediately finish instead of beginning to try to stream, then noticing the backing file does not contain even the first sector (since it does not exist) and then finishing normally. Signed-off-by: Max Reitz --- block/stream.c | 5 +