qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block-raw: Allow pread beyond the end of growab


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] block-raw: Allow pread beyond the end of growable images
Date: Wed, 01 Jul 2009 11:08:07 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Christoph Hellwig schrieb:
> On Wed, Jul 01, 2009 at 09:37:28AM +0200, Kevin Wolf wrote:
>> If you feel like posting a better patch, go ahead. I'm feeling that it's
>> going to be a whole lot uglier in bdrv_pwrite, but that might prove
>> wrong. And after all it is a problem with raw and not with the generic
>> block code - qcow2 for example was already reading zeros.
>>
>> For the time being, this patch fixes a bug and should stay.
> 
> So the only use case is a doing a savevm on a qcow2 device with a
> raw-posix backing dev?  What happens with nbd backing dev or a raw
> backing dev on win32?  OR (not sure we'll actually support that) another
> image format backing dev?

raw-win32 is actually a good question, I haven't tested that one. I
think nbd is used as a protocol rather than the format. qcow1/2 should
work, don't know for other formats like VMDK.

What is biting us here is that nobody has ever specified what the block
driver functions are supposed to do. They exist because they are in the
struct, their parameters have names that give a rough idea about their
meaning and that's it. Who cares about special cases?

That said, while implementing the the fix in bdrv_pwrite is going to be
ugly, we could do it in bdrv_read. Maybe this is the best approach.

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]