qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Ryan Harper <ryanh@us.ibm.com>, Amit Shah <amit.shah@redhat.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [Qemu-devel] To O_EXCL or not to O_EXCL open host_cdrom
Date: Tue, 12 Apr 2011 09:19:32 +0100	[thread overview]
Message-ID: <20110412081932.GC10071@redhat.com> (raw)
In-Reply-To: <4DA40904.2040103@redhat.com>

On Tue, Apr 12, 2011 at 10:10:44AM +0200, Kevin Wolf wrote:
> Am 12.04.2011 09:52, schrieb Daniel P. Berrange:
> >  - If the -drive specification has  readonly=on (thus O_RDONLY to
> >    open(2) call) , I expect QEMU (or the kernel) to forbid the
> >    "eject" command on the host CDROM. This should prevent two guests
> >    interfering seriously with each other.
> > 
> > So I think using O_EXCL would be OK, in the case where the block
> > driver was  host_cdrom and readonly=off.
> 
> This would overload readonly with a completely unrelated option (should
> eject be allowed). Doesn't sound like a great idea.

Use of the "host_cdrom" block driver enables passthrough of
commands to the host device.

Use of "readonly" is what controls whether individual passthrough
commands are actually permitted.

To me, "readonly" means don't allow anything that would impact
another guests view of the file/device. So forbidding 'eject'
is within scope of that IMHO.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2011-04-12  8:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 11:33 [Qemu-devel] To O_EXCL or not to O_EXCL open host_cdrom Stefan Hajnoczi
2011-04-11  5:07 ` [Qemu-devel] " Amit Shah
2011-04-11  8:31   ` Stefan Hajnoczi
2011-04-11 13:30     ` Avi Kivity
2011-04-11 13:27 ` [Qemu-devel] " Avi Kivity
2011-04-11 18:19 ` Christoph Hellwig
2011-04-12  7:52 ` Daniel P. Berrange
2011-04-12  8:10   ` Kevin Wolf
2011-04-12  8:19     ` Daniel P. Berrange [this message]
2011-04-12  9:14       ` Stefan Hajnoczi

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=20110412081932.GC10071@redhat.com \
    --to=berrange@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=hch@lst.de \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    --cc=stefanha@gmail.com \
    /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).