Received: from eggs.gnu.org ([2001:4830:134:3::10]:36581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0SkT-0004O5-AQ for qemu-devel@nongnu.org; Wed, 11 May 2016 07:56:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0SkQ-0003zL-Tp for qemu-devel@nongnu.org; Wed, 11 May 2016 07:56:16 -0400 Date: Wed, 11 May 2016 13:56:05 +0200 From: Kevin Wolf Message-ID: <20160511115605.GD4524@noname.str.redhat.com> References: <1462848659-28659-1-git-send-email-famz@redhat.com> <20160511114841.GE1683@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160511114841.GE1683@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: "Richard W.M. Jones" Cc: Fam Zheng , 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 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. 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