Received: from eggs.gnu.org ([208.118.235.92]:53199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USTk6-0007sC-6I for qemu-devel@nongnu.org; Wed, 17 Apr 2013 10:53:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USTk4-000600-L7 for qemu-devel@nongnu.org; Wed, 17 Apr 2013 10:53:50 -0400 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:61355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USTk4-0005zD-Ez for qemu-devel@nongnu.org; Wed, 17 Apr 2013 10:53:48 -0400 Received: by mail-we0-f173.google.com with SMTP id t57so1264615wey.4 for ; Wed, 17 Apr 2013 07:53:47 -0700 (PDT) Date: Wed, 17 Apr 2013 16:53:41 +0200 From: Stefan Hajnoczi Message-ID: <20130417145341.GA9854@stefanha-thinkpad.muc.redhat.com> References: <1366204073-8468-1-git-send-email-stefanha@redhat.com> <1366204073-8468-6-git-send-email-stefanha@redhat.com> <516EA182.80005@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <516EA182.80005@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 05/17] aio: stop using .io_flush() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Anthony Liguori , pingfank@linux.vnet.ibm.com, qemu-devel@nongnu.org, Stefan Hajnoczi On Wed, Apr 17, 2013 at 03:20:02PM +0200, Paolo Bonzini wrote: > Il 17/04/2013 15:07, Stefan Hajnoczi ha scritto: > > > > Due to this change we need to update tests/test-aio.c which asserts > > aio_poll() return values. Note that QEMU doesn't actually rely on these > > return values so only tests/test-aio.c cares. > > > > Note that ctx->notifier, the EventNotifier fd used for aio_notify(), is > > now handled as a special case. This is a little ugly but maintains > > aio_poll() semantics, i.e. aio_notify() does not count as 'progress' and > > aio_poll() avoids blocking when the user has not set any fd handlers yet. > > > > Patches after this remove .io_flush() handler code until we can finally > > drop the io_flush arguments to aio_set_fd_handler() and friends. > > Dropping aio_poll()'s return value is ok (as a follow up). The test > generally test for progress anyway with assertions on the results of the > notify callbacks. I thought about dropping aio_poll()'s return value but decided to leave return values tested. Although only test-aio.c cares about the return values, it's actually handy. It means we'll notice any changes to aio_poll() semantics. At least it was useful to me while writing these patches - it forced me to think carefully about how aio_poll() behaved previously. Stefan