qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: reject O_RDWR open for read-only images


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] block: reject O_RDWR open for read-only images
Date: Fri, 23 Apr 2010 18:09:09 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

Am 07.04.2010 14:32, schrieb Kevin Wolf:
> Am 07.04.2010 13:57, schrieb Christoph Hellwig:
>> Various obscure image format drivers do not allow write access.
>> Instead of silently falling back to read-only access reject attempts
>> to open these images for write access.
>>
>> Signed-off-by: Christoph Hellwig <address@hidden>
> 
> I'm not sure about this patch. I don't have any such images around, so I
> can't test it easily, but it looks to me as if you'd need to explicitly
> specify readonly=on if you want to use such formats. This in turn means
> that old style shortcuts like -hda don't work any more. Is it that
> important to avoid implicit fallbacks for obscure formats that we're
> willing to sacrifice compatibility?
> 
> That said, personally I don't care about those format all that much
> anyway and the change would make things more consistent. If people
> consider it okay to break compatibility in this way, I won't stand in
> your way.
> 
> But if we wanted to implement this, have you thought about doing it in
> one place in block.c? You could check if a driver supports bdrv_write or
> bdrv_aio_write, and if it doesn't support either I think you can assume
> it's read-only.

Christoph, what about this one? It's still in the block branch, but I
have excluded it from first pull request round because these questions
are still open.

What should I do with it? Drop it, wait for a new version or keep it as
it is? If you're not going to drop it, I'd definitely like to hear more
opinions on the compatibility thing before proposing it for a merge in a
pull request.

Kevin




reply via email to

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