All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: reject O_RDWR open for read-only images
Date: Wed, 07 Apr 2010 14:32:34 +0200	[thread overview]
Message-ID: <4BBC7B62.7060607@redhat.com> (raw)
In-Reply-To: <20100407115753.GB12452@lst.de>

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 <hch@lst.de>

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.

Kevin

  reply	other threads:[~2010-04-07 12:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-07 11:57 [Qemu-devel] [PATCH] block: reject O_RDWR open for read-only images Christoph Hellwig
2010-04-07 12:32 ` Kevin Wolf [this message]
2010-04-23 16:09   ` Kevin Wolf
2010-04-23 16:19     ` Christoph Hellwig
2010-04-07 15:02 ` Stefan Hajnoczi
2010-04-08  7:53   ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BBC7B62.7060607@redhat.com \
    --to=kwolf@redhat.com \
    --cc=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.