qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Naphtali Sprei <nsprei@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] Added 'access' option to -drive flag
Date: Thu, 07 Jan 2010 13:59:47 -0600	[thread overview]
Message-ID: <4B463D33.6050301@codemonkey.ws> (raw)
In-Reply-To: <4B338293.4000306@redhat.com>

On 12/24/2009 09:02 AM, Naphtali Sprei wrote:
> The new option is: access=[rw|ro|auto]
> rw: open the drive's file with Read and Write permission, don't continue if failed
> ro: open the file only with Read permission
> auto: open the file with Read and Write permission, if failed, try only Read permision
>
> For compatibility reasons, the default is 'auto'. Should be changed later on.
>
> This option replaces the 'readonly' options added lately.
>
> Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,
> pass the request in the flags parameter to the function.
>
> The BDRV_O_RDWR/RDONLY becomes just one bit, BDRV_O_RDONLY gone.
>    

Users shouldn't be involved in deciding how an image is open.

Instead, marking a drive read only (via readonly) should cause a file to 
be open read-only.  By default, when media=cdrom, we should toggle the 
readonly flag.

As for the behaviour with trying read-write and then read-only, let's 
just drop it.  It's a bug and I've seen it reported half a dozen times 
as such.

Regards,

Anthony Liguori

           reply	other threads:[~2010-01-07 19:59 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4B338293.4000306@redhat.com>]

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=4B463D33.6050301@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --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).