From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLIRW-0001Fq-Pg for qemu-devel@nongnu.org; Thu, 17 Dec 2009 10:39:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLIRR-0001ES-QK for qemu-devel@nongnu.org; Thu, 17 Dec 2009 10:39:06 -0500 Received: from [199.232.76.173] (port=59323 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLIRR-0001EP-Ib for qemu-devel@nongnu.org; Thu, 17 Dec 2009 10:39:01 -0500 Received: from mail2.shareable.org ([80.68.89.115]:32944) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NLIRQ-0001i8-KC for qemu-devel@nongnu.org; Thu, 17 Dec 2009 10:39:01 -0500 Date: Thu, 17 Dec 2009 15:38:57 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH VERSION 3] Disk image exclusive and shared locks. Message-ID: <20091217153857.GH24967@shareable.org> References: <20091215164238.GA24410@amd.home.annexia.org> <20091217105345.GB17205@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091217105345.GB17205@lst.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: "Richard W.M. Jones" , qemu-devel@nongnu.org Christoph Hellwig wrote: > 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. Due to that I do suggest opening block devices with O_EXCL when exclusive locking is requested. -- Jamie