From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHdsg-0000DN-Gf for qemu-devel@nongnu.org; Mon, 07 Dec 2009 08:44:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHdsb-000081-9H for qemu-devel@nongnu.org; Mon, 07 Dec 2009 08:44:01 -0500 Received: from [199.232.76.173] (port=40362 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHdsb-00007q-0u for qemu-devel@nongnu.org; Mon, 07 Dec 2009 08:43:57 -0500 Received: from mail-iw0-f197.google.com ([209.85.223.197]:41770) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHdsa-0006XF-VV for qemu-devel@nongnu.org; Mon, 07 Dec 2009 08:43:57 -0500 Received: by iwn35 with SMTP id 35so3042469iwn.4 for ; Mon, 07 Dec 2009 05:43:56 -0800 (PST) Message-ID: <4B1D0699.4070402@codemonkey.ws> Date: Mon, 07 Dec 2009 07:43:53 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Disk image shared and exclusive locks. References: <4B1943A0.7030509@codemonkey.ws> <20091204215517.GA5938@amd.home.annexia.org> <4B198D5B.5080803@codemonkey.ws> <4B1A98D9.7010408@redhat.com> <4B1A9C9F.5040705@codemonkey.ws> <4B1A9E83.2050103@redhat.com> <4B1A9F8C.3010106@codemonkey.ws> <20091207103128.GA26970@shareable.org> <20091207104517.GJ24530@redhat.com> <20091207111953.GA29980@shareable.org> <20091207113014.GK24530@redhat.com> In-Reply-To: <20091207113014.GK24530@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: "Richard W.M. Jones" , qemu-devel@nongnu.org, Avi Kivity Daniel P. Berrange wrote: > That doesn't work in the case of setting up a clustered filesystem > shared between guests. That requires that the disk be opened writable, > but with a shared (F_RDLOCK) lock. > If you'd like data corruption :-) qemu -drive file=/dev/hda,lock=shared # clustered file system qemu -drive file=/dev/hda,lock=shared # clustered file system qemu -drive file=/dev/hda,lock=shared -snapshot # i have no awareness of the last two. The 3rd invocation is totally fine. /dev/hda is shared (but the expectation is read-only). Better to stick with on/off. That gives much easier to understand semantics. Regards, Anthony Liguori