From: Jamie Lokier <jamie@shareable.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Naphtali Sprei <nsprei@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] A different way to ask for readonly drive
Date: Thu, 17 Dec 2009 13:16:35 +0000 [thread overview]
Message-ID: <20091217131635.GA24967@shareable.org> (raw)
In-Reply-To: <20091217105004.GA17205@lst.de>
Christoph Hellwig wrote:
> On Tue, Dec 15, 2009 at 06:45:01PM +0000, Jamie Lokier wrote:
> > access=rw
> > access=ro
> > access=auto (default)
>
> Yes, that sounds like the least clumsy one. I still think the current
> implementation is a very bad default, though.
Without agreeing or disagreeing over whether it's a bad default :), a
usability problem occurs with the current implementation when you
deliberately "chmod 444" an image to have high confidence that it's
opened read only: When running as root, file permissions are ignored
(except sometimes on NFS).
For that reason I use "chattr +i" on all my read-only image files, to
really make sure that no qemu invocation mistake could accidentally
corrupt valuable images. That works, but it's not very convenient.
If the "auto" method is kept, I think it would be an improvement if it
checks the file permission itself, and does not even try to open a
file O_RDWR if there are no writable permission bits - so that "chmod
444" has the same "open as read only" effect when qemu is invoked as root.
-- Jamie
next prev parent reply other threads:[~2009-12-17 13:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-14 13:35 [Qemu-devel] [PATCH] A different way to ask for readonly drive Naphtali Sprei
2009-12-14 15:53 ` Stefan Weil
2009-12-15 18:45 ` Jamie Lokier
2009-12-15 22:09 ` Stefan Weil
2009-12-17 10:50 ` Christoph Hellwig
2009-12-17 13:16 ` Jamie Lokier [this message]
2009-12-17 14:23 ` Kevin Wolf
2009-12-17 15:30 ` Jamie Lokier
2009-12-17 14:31 ` Markus Armbruster
2009-12-15 17:45 ` Kevin Wolf
2009-12-17 11:31 ` Richard W.M. Jones
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=20091217131635.GA24967@shareable.org \
--to=jamie@shareable.org \
--cc=hch@lst.de \
--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 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.