From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5kk7-00067V-Fv for qemu-devel@nongnu.org; Thu, 18 Jun 2015 21:05:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5kk6-0002K5-Jn for qemu-devel@nongnu.org; Thu, 18 Jun 2015 21:05:15 -0400 Date: Fri, 19 Jun 2015 09:05:06 +0800 From: Fam Zheng Message-ID: <20150619010506.GC2202@ad.nay.redhat.com> References: <1433926791-10580-1-git-send-email-famz@redhat.com> <1433926791-10580-3-git-send-email-famz@redhat.com> <20150616135738.GA3132@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150616135738.GA3132@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 2/9] iohandler: Use aio code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Weil , qemu-devel@nongnu.org, Stefan Hajnoczi , Jan Kiszka , Paolo Bonzini On Tue, 06/16 14:57, Stefan Hajnoczi wrote: > On Wed, Jun 10, 2015 at 04:59:44PM +0800, Fam Zheng wrote: > > diff --git a/iohandler.c b/iohandler.c > > index 826f713..f5d7704 100644 > > --- a/iohandler.c > > +++ b/iohandler.c > > @@ -32,111 +32,39 @@ > > #include > > #endif > > > > -typedef struct IOHandlerRecord { > > - IOHandler *fd_read; > > - IOHandler *fd_write; > > - void *opaque; > > - QLIST_ENTRY(IOHandlerRecord) next; > > - int fd; > > - int pollfds_idx; > > - bool deleted; > > -} IOHandlerRecord; > > +static AioContext *iohandler_ctx; > > Please include a comment explaining why this AioContext is needed in > addition to the global qemu_aio_context. OK! It's needed because iohandlers shouldn't be polled by aio_poll(). Fam