From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHwss-0003g7-SQ for qemu-devel@nongnu.org; Tue, 08 Dec 2009 05:01:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHwsn-0003al-Q9 for qemu-devel@nongnu.org; Tue, 08 Dec 2009 05:01:30 -0500 Received: from [199.232.76.173] (port=43308 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHwsn-0003aZ-0F for qemu-devel@nongnu.org; Tue, 08 Dec 2009 05:01:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10960) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHwsm-0002Pb-AC for qemu-devel@nongnu.org; Tue, 08 Dec 2009 05:01:24 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB8A1Nf5022122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Dec 2009 05:01:23 -0500 Message-ID: <4B1E23B1.9040504@redhat.com> Date: Tue, 08 Dec 2009 11:00:17 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH VERSION 2] Disk image shared and exclusive locks. References: <20091204165301.GA4167@amd.home.annexia.org> <20091207141652.GA28705@amd.home.annexia.org> In-Reply-To: <20091207141652.GA28705@amd.home.annexia.org> Content-Type: text/plain; charset=ISO-8859-15 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: qemu-devel@nongnu.org Am 07.12.2009 15:16, schrieb Richard W.M. Jones: > Here's a second go at this patch. The only change is that we add a > second parameter (backinglock=none|shared|exclusive) which can be used > to control locking on the first level (only) of backing disk. And what about the backing file of the backing file? ;-) This approach feels wrong somehow. We need to infer the locking for backing file from the COW file (none => none; shared/exclusive => shared; commit acquires an exclusive lock temporarily, but still can't prevent corruption with turned off VMs) You probably should add the locking flags to bdrv_open calls in qemu-img, too. Kevin