From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adaP5-0006BC-MW for qemu-devel@nongnu.org; Wed, 09 Mar 2016 04:27:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adaP4-0004MO-Uy for qemu-devel@nongnu.org; Wed, 09 Mar 2016 04:27:39 -0500 Date: Wed, 9 Mar 2016 17:27:30 +0800 From: Fam Zheng Message-ID: <20160309092730.GL17947@ad.usersys.redhat.com> References: <1455645388-32401-1-git-send-email-pbonzini@redhat.com> <1455645388-32401-14-git-send-email-pbonzini@redhat.com> <20160309083049.GI17947@ad.usersys.redhat.com> <56DFE88E.60307@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56DFE88E.60307@redhat.com> Subject: Re: [Qemu-devel] [PATCH 13/16] block: only call aio_poll from iothread List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com On Wed, 03/09 10:10, Paolo Bonzini wrote: > > > On 09/03/2016 09:30, Fam Zheng wrote: > > > - aio_poll(bdrv_get_aio_context(bs), true); > > > + if (aio_context_in_iothread(ctx)) { > > > + /* This case should not occur at all, except for the > > > + * main thread. > > > + */ > > > > Maybe assert ctx == qemu_get_aio_context()? > > Actually it happens for block/mirror.c's bdrv_drained_begin, but it's safe. Oh yes, then we cannot assert, and the comment need adjustion. Thanks for pointing out. Fam