From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHf2U-0001Pa-3b for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:58:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHf2S-0001N5-3z for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:58:13 -0500 Received: from [199.232.76.173] (port=54673 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHf2R-0001Mn-PR for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:58:11 -0500 Received: from alpha.arachsys.com ([91.203.57.7]:56208) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NHf2R-0006OD-Cx for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:58:11 -0500 Date: Mon, 7 Dec 2009 14:58:07 +0000 From: Chris Webb Subject: Re: [Qemu-devel] [PATCH] Disk image shared and exclusive locks. Message-ID: <20091207145807.GC10336@arachsys.com> References: <20091204165301.GA4167@amd.home.annexia.org> <20091207103908.GI2271@arachsys.com> <4B1D03E0.5080006@codemonkey.ws> <20091207142511.GP24530@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091207142511.GP24530@redhat.com> 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 "Daniel P. Berrange" writes: > The only other alternative would be for the destination to open the disks, > but not immediately acquire the locks. In the final stage of migration have > the source release its lock & signal to the dest that it can now acquire > the lock. The assumption being that the lock acquisition is far less likely > to fail than the open(), so we focus on making sure we can properly handle > open() failure. This is what we've implemented as a prototype for sheepdog, with bdrv_claim (happens on vm_start) and bdrv_release (happens on exit/vm_stop) hooks available to block drivers. Cheers, Chris.