From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etASr-0004vR-4T for qemu-devel@nongnu.org; Tue, 06 Mar 2018 06:09:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etASq-0005iG-7o for qemu-devel@nongnu.org; Tue, 06 Mar 2018 06:09:01 -0500 Date: Tue, 6 Mar 2018 12:08:44 +0100 From: Kevin Wolf Message-ID: <20180306110844.GC7139@localhost.localdomain> References: <20180306105354.15197-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180306105354.15197-1-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: make BDRV_POLL_WHILE() re-entrancy safe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Paolo Bonzini , "fuweiwei (C)" , Max Reitz , qemu-block@nongnu.org Am 06.03.2018 um 11:53 hat Stefan Hajnoczi geschrieben: > Nested BDRV_POLL_WHILE() calls can occur. Currently > assert(!bs_->wakeup) will fail when this happens. > > This patch converts bs->wakeup from bool to a counter. > > Nesting works correctly because outer BDRV_POLL_WHILE() callers evaluate > the condition again after the inner caller completes (invoking the inner > caller counts as aio_poll() progress). > > Reported-by: "fuweiwei (C)" > Cc: Paolo Bonzini > Signed-off-by: Stefan Hajnoczi Doesn't this conflict with your own AIO_WAIT_WHILE() patch? Kevin