From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0f6f-00086e-J3 for qemu-devel@nongnu.org; Wed, 11 May 2016 21:08:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0f6d-0001Ul-Ds for qemu-devel@nongnu.org; Wed, 11 May 2016 21:08:00 -0400 Date: Thu, 12 May 2016 09:07:51 +0800 From: Fam Zheng Message-ID: <20160512010751.GA17594@ad.usersys.redhat.com> References: <1462848659-28659-1-git-send-email-famz@redhat.com> <20160511114841.GE1683@redhat.com> <20160511115605.GD4524@noname.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160511115605.GD4524@noname.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 00/27] block: Lock images when opening List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: "Richard W.M. Jones" , qemu-devel@nongnu.org, Max Reitz , Jeff Cody , Markus Armbruster , Eric Blake , qemu-block@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com, John Snow , berrange@redhat.com, den@openvz.org On Wed, 05/11 13:56, Kevin Wolf wrote: > Am 11.05.2016 um 13:48 hat Richard W.M. Jones geschrieben: > > While I remember there is another concern that doesn't seem to be > > addressed in this patch series. What happens when a guest is paused? > > I think exclusive locks should be converted to shared locks in that > > case, since (only while the guest is paused) it _is_ safe to fish > > around inside the guest's state. Of course the lock must be restored > > before the guest resumes. > > I think it's still one of the cases where it's appropriate to require an > "I know what I'm doing" flag. In paused guests, you still don't > necessarily see the same contents as the guest does (because of guest > caches). Apart from that, things like block jobs and NBD servers keep > running even with a stopped VM. Agreed. The external accessor can explicitly specify "lock-image=off" on its command line to fish around. Fam > > The lock can only be dropped in cases where we can justify switching to > BDRV_O_INACTIVE, and I don't think a simple stop/cont should do this. > > Kevin