From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2l8d-0005ID-Hf for qemu-devel@nongnu.org; Fri, 26 Jul 2013 12:45:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2l8a-0005LN-Az for qemu-devel@nongnu.org; Fri, 26 Jul 2013 12:45:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2l8a-0005Jc-1k for qemu-devel@nongnu.org; Fri, 26 Jul 2013 12:45:04 -0400 Date: Fri, 26 Jul 2013 12:44:54 -0400 From: Jeff Cody Message-ID: <20130726164454.GC28317@localhost.localdomain> References: <1374765505-14356-1-git-send-email-stefanha@redhat.com> <1374765505-14356-4-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1374765505-14356-4-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 03/18] dataplane/virtio-blk: check exit conditions before aio_poll() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Ping Fan Liu , qemu-devel@nongnu.org, Michael Roth , alex@alex.org.uk, Paolo Bonzini On Thu, Jul 25, 2013 at 05:18:10PM +0200, Stefan Hajnoczi wrote: > Check exit conditions before entering blocking aio_poll(). This is > mainly for consistency since it's unlikely that we are stopping in the > first event loop iteration. > > Signed-off-by: Stefan Hajnoczi > --- > hw/block/dataplane/virtio-blk.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c > index 2faed43..8d3e145 100644 > --- a/hw/block/dataplane/virtio-blk.c > +++ b/hw/block/dataplane/virtio-blk.c > @@ -379,9 +379,9 @@ static void *data_plane_thread(void *opaque) > { > VirtIOBlockDataPlane *s = opaque; > > - do { > + while (!s->stopping || s->num_reqs > 0) { > aio_poll(s->ctx, true); > - } while (!s->stopping || s->num_reqs > 0); > + } > return NULL; > } > > -- > 1.8.1.4 > > Reviewed-by: Jeff Cody