qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH v2] Added 'access' option to -drive flag
       [not found] <4B338293.4000306@redhat.com>
@ 2010-01-07 19:59 ` Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2010-01-07 19:59 UTC (permalink / raw)
  To: Naphtali Sprei; +Cc: qemu-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-07 19:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4B338293.4000306@redhat.com>
2010-01-07 19:59 ` [Qemu-devel] [PATCH v2] Added 'access' option to -drive flag Anthony Liguori

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).