From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asV4O-0000VE-Oz for qemu-devel@nongnu.org; Tue, 19 Apr 2016 08:47:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asV4O-0008Eb-0Y for qemu-devel@nongnu.org; Tue, 19 Apr 2016 08:47:56 -0400 Date: Tue, 19 Apr 2016 20:40:48 +0800 From: Fam Zheng Message-ID: <20160419124048.GD28572@ad-mail.usersys.redhat.com> References: <1460690887-32751-1-git-send-email-famz@redhat.com> <20160418095344.GD19600@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160418095344.GD19600@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.7 v2 00/17] block: Lock images when opening List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, Kevin Wolf , Max Reitz , Jeff Cody , Markus Armbruster , Eric Blake , John Snow , qemu-block@nongnu.org, pbonzini@redhat.com, den@openvz.org On Mon, 04/18 10:53, Daniel P. Berrange wrote: > If you want todo locks inside of QEMU, you really can't rely > on delegating handling to each individual block driver instance. > You need to have a process global registry of which files you have > already locked, and check against that registry before even > attempting to open any file that might correspond to a disk image. > This registry needs to canonicalize the file path too, to allow > for possibility of QEMU being given differen paths to the same > file. Yes, you're completely right. Thank you for bringing up it again and so clearly. I'll revise the code. Fam