From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTrzT-0008Vz-PY for qemu-devel@nongnu.org; Tue, 16 Sep 2014 08:36:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTrzL-00011M-NP for qemu-devel@nongnu.org; Tue, 16 Sep 2014 08:36:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTrzL-00010Z-GH for qemu-devel@nongnu.org; Tue, 16 Sep 2014 08:36:07 -0400 Message-ID: <54182EAE.4000802@redhat.com> Date: Tue, 16 Sep 2014 14:35:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <5416C46D.7040105@ozlabs.ru> <541826CA.7050607@ozlabs.ru> <541828BF.8090301@redhat.com> <20140916123431.GB4886@noname.str.redhat.com> In-Reply-To: <20140916123431.GB4886@noname.str.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] migration: qemu-coroutine-lock.c:141: qemu_co_mutex_unlock: Assertion `mutex->locked == 1' failed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Alexey Kardashevskiy , "qemu-devel@nongnu.org" , Max Reitz , Stefan Hajnoczi , "Dr. David Alan Gilbert" Il 16/09/2014 14:34, Kevin Wolf ha scritto: > I think bdrv_invalidate_cache() really needs to call bdrv_drain_all() > before starting to reopen stuff. There could be requests in flight > without holding the lock and if you can indeed reopen their BDS under > their feet without breaking things (I doubt it), that would be pure > luck. But even that's not enough without a lock if .bdrv_invalidate_cache (the callback) is called from a coroutine. As soon as it yields, another request can come in, for example from the NBD server. Paolo