From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp5M1-0000iP-1Z for qemu-devel@nongnu.org; Wed, 21 Oct 2015 22:11:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zp5Le-0001Qv-QW for qemu-devel@nongnu.org; Wed, 21 Oct 2015 22:11:23 -0400 Date: Thu, 22 Oct 2015 10:11:16 +0800 From: Fam Zheng Message-ID: <20151022021116.GC11063@ad.usersys.redhat.com> References: <1445393209-26545-1-git-send-email-famz@redhat.com> <1445393209-26545-5-git-send-email-famz@redhat.com> <20151021155608.GC6466@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151021155608.GC6466@localhost.localdomain> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v5 04/12] aio: introduce aio_{disable, enable}_external List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com On Wed, 10/21 11:56, Jeff Cody wrote: > > +static inline bool aio_node_check(AioContext *ctx, bool is_external) > > +{ > > + return !is_external || !atomic_read(&ctx->external_disable_cnt); > > +} > > + > > It seems a little odd to me to have this helper function take the > is_external bool field from the node as the argument - any reason to > do that, rather than pass in the AioHandler and have aio_node_check() > parse whatever fields it deems necessary from it? AioHandler is defined differently for posix and win32, but I didn't want to duplicate this function in two files. Fam