From: Ian Jackson Subject: Re: xl create should refuse to share block devices RW between domains Date: Tue, 27 Jul 2010 16:17:52 +0100 Message-ID: <19534.63648.652292.804989@mariner.uk.xensource.com> References: <4C4E2A06.9070604@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C4E2A06.9070604@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: "Xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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. 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 ? Ian.