From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHf06-0006mT-UB for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:55:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHf02-0006h0-SS for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:55:46 -0500 Received: from [199.232.76.173] (port=54607 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHf02-0006gK-7J for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:55:42 -0500 Received: from mail-gx0-f223.google.com ([209.85.217.223]:47189) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHf01-00067Q-Qb for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:55:42 -0500 Received: by gxk23 with SMTP id 23so1885754gxk.2 for ; Mon, 07 Dec 2009 06:55:40 -0800 (PST) Message-ID: <4B1D1769.1000701@codemonkey.ws> Date: Mon, 07 Dec 2009 08:55:37 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Disk image shared and exclusive locks. References: <20091204165301.GA4167@amd.home.annexia.org> <4B1943A0.7030509@codemonkey.ws> <20091204215517.GA5938@amd.home.annexia.org> <4B198D5B.5080803@codemonkey.ws> <4B1A98D9.7010408@redhat.com> <4B1A9C9F.5040705@codemonkey.ws> <20091207105855.GK23109@amd.home.annexia.org> <4B1D057F.9000708@codemonkey.ws> <20091207140857.GQ23109@amd.home.annexia.org> <4B1D0FA0.8060500@codemonkey.ws> <20091207143116.GR23109@amd.home.annexia.org> In-Reply-To: <20091207143116.GR23109@amd.home.annexia.org> 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: "Richard W.M. Jones" Cc: Avi Kivity , qemu-devel@nongnu.org Richard W.M. Jones wrote: > So to be clear, the use case is that all the other VMs must be shut > down, then the VM which wants to commit will upgrade its lock and > commit, and then all the other VMs will restart? I agree this should > avoid corruption, although it sounds like something which is fairly > unlikely to be done in practice. > Commit is an extremely uncommon use-case. There's really no correct way to use it. That said, assuming people used it, here would be a reasonable flow: 1) user starts up with base.img -> cow.img 2) user makes some changes, realized it would be good for the golden master so issues a commit to base.img 3) user does not shut down this machine 4) user tries to start another vm with a base.img -> cow2.img This is a valid scenario and temporarily promoting to write lock during commit allows this scenario without introducing a window for data corruption. Regards, Anthony Liguori