From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3isg-0006Yz-AP for qemu-devel@nongnu.org; Mon, 29 Jul 2013 04:32:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3isX-0007E7-Dy for qemu-devel@nongnu.org; Mon, 29 Jul 2013 04:32:38 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:47188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3isW-0007E1-UF for qemu-devel@nongnu.org; Mon, 29 Jul 2013 04:32:29 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 29 Jul 2013 13:57:00 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 6F1A1E0053 for ; Mon, 29 Jul 2013 14:02:25 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6T8XLVF41353328 for ; Mon, 29 Jul 2013 14:03:22 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r6T8WGQG006147 for ; Mon, 29 Jul 2013 18:32:18 +1000 Message-ID: <51F62888.1050500@linux.vnet.ibm.com> Date: Mon, 29 Jul 2013 16:32:08 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1374765505-14356-1-git-send-email-stefanha@redhat.com> <1374765505-14356-16-git-send-email-stefanha@redhat.com> In-Reply-To: <1374765505-14356-16-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 15/18] dataplane/virtio-blk: drop flush_true() and flush_io() 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 Reviewed-by: Wenchao Xia > .io_flush() is no longer called so drop flush_true() and flush_io(). > > Signed-off-by: Stefan Hajnoczi > --- > hw/block/dataplane/virtio-blk.c | 17 ++--------------- > 1 file changed, 2 insertions(+), 15 deletions(-) > > diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c > index 8d3e145..f8624d1 100644 > --- a/hw/block/dataplane/virtio-blk.c > +++ b/hw/block/dataplane/virtio-blk.c > @@ -264,11 +264,6 @@ static int process_request(IOQueue *ioq, struct iovec iov[], > } > } > > -static int flush_true(EventNotifier *e) > -{ > - return true; > -} > - > static void handle_notify(EventNotifier *e) > { > VirtIOBlockDataPlane *s = container_of(e, VirtIOBlockDataPlane, > @@ -348,14 +343,6 @@ static void handle_notify(EventNotifier *e) > } > } > > -static int flush_io(EventNotifier *e) > -{ > - VirtIOBlockDataPlane *s = container_of(e, VirtIOBlockDataPlane, > - io_notifier); > - > - return s->num_reqs > 0; > -} > - > static void handle_io(EventNotifier *e) > { > VirtIOBlockDataPlane *s = container_of(e, VirtIOBlockDataPlane, > @@ -486,7 +473,7 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s) > exit(1); > } > s->host_notifier = *virtio_queue_get_host_notifier(vq); > - aio_set_event_notifier(s->ctx, &s->host_notifier, handle_notify, flush_true); > + aio_set_event_notifier(s->ctx, &s->host_notifier, handle_notify, NULL); > > /* Set up ioqueue */ > ioq_init(&s->ioqueue, s->fd, REQ_MAX); > @@ -494,7 +481,7 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s) > ioq_put_iocb(&s->ioqueue, &s->requests[i].iocb); > } > s->io_notifier = *ioq_get_notifier(&s->ioqueue); > - aio_set_event_notifier(s->ctx, &s->io_notifier, handle_io, flush_io); > + aio_set_event_notifier(s->ctx, &s->io_notifier, handle_io, NULL); > > s->started = true; > trace_virtio_blk_data_plane_start(s); > -- Best Regards Wenchao Xia