qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Naphtali Sprei <nsprei@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Add readonly flag to -drive command
Date: Mon, 12 Oct 2009 16:07:15 +0200	[thread overview]
Message-ID: <4AD33813.6090006@redhat.com> (raw)
In-Reply-To: <20091012135032.GA13560@shareable.org>

Am 12.10.2009 15:50, schrieb Jamie Lokier:
> Right now there is already a 'readonly' flag called 'chmod -r image',
> because QEMU opens a file read-only if it can't open it writable, so
> it's not a new case.  Just moving it from the filesystem into QEMU.

Right, but I'm not sure how well it is tested. I think, when moving it
into qemu we should take the opportunity to do it right. If everything
works right now, the right description of it is probably "pure luck".
And I assume you didn't do stupid things like savevm on a read-only
image which we still should be able to handle.

> When opened read-only, it would be better for the block drivers to
> return an error themselves, instead of trying to write and (hopefully)
> getting a host OS error.

For simple read/write operations, the generic block layer is doing the
check already.

Kevin

  reply	other threads:[~2009-10-12 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12 12:47 [Qemu-devel] [PATCH] Add readonly flag to -drive command Naphtali Sprei
2009-10-12 13:24 ` Kevin Wolf
2009-10-12 13:50   ` Jamie Lokier
2009-10-12 14:07     ` Kevin Wolf [this message]
2009-10-12 14:30     ` Anthony Liguori
2009-10-12 15:16       ` Jamie Lokier
2009-10-12 16:15       ` Michael Tokarev
2009-10-13  7:36         ` Kevin Wolf
2009-10-12 14:06   ` Anthony Liguori

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=4AD33813.6090006@redhat.com \
    --to=kwolf@redhat.com \
    --cc=jamie@shareable.org \
    --cc=nsprei@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).