From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: xl create should refuse to share block devices RW between domains
Date: Tue, 27 Jul 2010 08:23:43 -0700 [thread overview]
Message-ID: <4C4EF9FF.6090906@goop.org> (raw)
In-Reply-To: <19534.63648.652292.804989@mariner.uk.xensource.com>
On 07/27/2010 08:17 AM, Ian Jackson wrote:
> Jeremy Fitzhardinge writes ("xl create should refuse to share block devices RW between domains"):
>> When creating a domain, "xl create" should fail if a block device is
>> shared RW between domains, like xm create does.
>>
>> I'm not sure how this would be implemented. Search xenstore for
>> references to the device when setting up a domain?
> Does this safety catch have to be 100% reliable ? If not then there
> are some useful heuristics: for example, you could see whether the
> device is a devmapper device and if so check its open count. That
> would catch simultaneously mounting the fs in dom0.
Well, my specific use case is that I have pairs of domain configs, one
PV, one HVM, referring to the same set of resources. I want xl create
to catch when I try and create the PV version of a domain while the HVM
is still running.
A more comprehensive check would be nice, but just this would be
useful. But whatever it does check should be 100% reliable.
> Doesn't the kernel already have some features to try to stop multiple
> conflicting uses of the same block device ? Perhaps blktap[2] should
> do the same ?
Not in general. The only interlock the kernel has is that you can't
change the partition mapping on a device while it is in use. The
e2fsprogs do generally try to stop mistakes like fscking a mounted
filesystem, but it fails to detect if the block device is being used by
blktap (and that does make quite a bit of a mess, it turns out...).
J
next prev parent reply other threads:[~2010-07-27 15:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 0:36 xl create should refuse to share block devices RW between domains Jeremy Fitzhardinge
2010-07-27 8:18 ` Ian Campbell
2010-07-27 10:40 ` Stefano Stabellini
2010-07-27 10:55 ` Ian Campbell
2010-07-27 15:18 ` Jeremy Fitzhardinge
2010-07-27 15:47 ` Ian Campbell
2010-07-27 18:17 ` Daniel Stodden
2010-07-27 15:17 ` Ian Jackson
2010-07-27 15:23 ` Jeremy Fitzhardinge [this message]
2010-07-27 15:33 ` Ian Jackson
2010-07-27 15:50 ` Ian Campbell
2010-07-27 16:01 ` Jeremy Fitzhardinge
2010-07-27 16:07 ` Stefano Stabellini
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=4C4EF9FF.6090906@goop.org \
--to=jeremy@goop.org \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=Xen-devel@lists.xensource.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 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.