qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH VERSION 3] Disk image exclusive and shared locks.
Date: Thu, 17 Dec 2009 11:53:45 +0100	[thread overview]
Message-ID: <20091217105345.GB17205@lst.de> (raw)
In-Reply-To: <20091215164238.GA24410@amd.home.annexia.org>


FYI I don't think this is all too useful.  Just about no one actually
uses file locking APIs on block devices.  If you want to provide
protection against mounting the image on the host or scribbling over it
using mkfs you need to open the block device node with O_EXCL on Linux
as that's the mechanisms most tools and the filesystem code us for
exclusion.

If you're primarily interested in protection against other qemu
instances you can add you code on top, but that seems like a rather
marginal use case.

  parent reply	other threads:[~2009-12-17 10:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 16:42 [Qemu-devel] [PATCH VERSION 3] Disk image exclusive and shared locks Richard W.M. Jones
2009-12-15 18:02 ` Anthony Liguori
2009-12-15 18:09   ` Richard W.M. Jones
2009-12-15 18:45     ` Anthony Liguori
2009-12-15 18:33 ` Jamie Lokier
2009-12-15 23:26   ` Jamie Lokier
2009-12-16 10:37   ` Kevin Wolf
2009-12-17 13:26     ` Jamie Lokier
2009-12-17 10:53 ` Christoph Hellwig [this message]
2009-12-17 11:06   ` Richard W.M. Jones
2009-12-17 15:38   ` Jamie Lokier

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=20091217105345.GB17205@lst.de \
    --to=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.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).