From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULMOX-0000uB-Nt for qemu-devel@nongnu.org; Thu, 28 Mar 2013 19:38:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULMOW-0001Nf-Jg for qemu-devel@nongnu.org; Thu, 28 Mar 2013 19:38:09 -0400 Received: from mail-ee0-f43.google.com ([74.125.83.43]:54782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULMOW-0001MO-Cy for qemu-devel@nongnu.org; Thu, 28 Mar 2013 19:38:08 -0400 Received: by mail-ee0-f43.google.com with SMTP id e50so25969eek.16 for ; Thu, 28 Mar 2013 16:38:07 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5154D45B.5060200@redhat.com> Date: Fri, 29 Mar 2013 00:38:03 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1364507550-25093-1-git-send-email-aliguori@us.ibm.com> <1364507550-25093-3-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1364507550-25093-3-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 2/3] sheepdog: pass NULL for io_flush List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , qemu-devel@nongnu.org, Mike Roth Il 28/03/2013 22:52, Anthony Liguori ha scritto: > Signed-off-by: Anthony Liguori > --- > block/sheepdog.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/block/sheepdog.c b/block/sheepdog.c > index bb67c4c..2bccd9b 100644 > --- a/block/sheepdog.c > +++ b/block/sheepdog.c > @@ -503,13 +503,6 @@ static void restart_co_req(void *opaque) > qemu_coroutine_enter(co, NULL); > } > > -static int have_co_req(void *opaque) > -{ > - /* this handler is set only when there is a pending request, so > - * always returns 1. */ > - return 1; > -} > - > typedef struct SheepdogReqCo { > int sockfd; > SheepdogReq *hdr; > @@ -532,14 +525,14 @@ static coroutine_fn void do_co_req(void *opaque) > unsigned int *rlen = srco->rlen; > > co = qemu_coroutine_self(); > - qemu_aio_set_fd_handler(sockfd, NULL, restart_co_req, have_co_req, co); > + qemu_aio_set_fd_handler(sockfd, NULL, restart_co_req, NULL, co); > > ret = send_co_req(sockfd, hdr, data, wlen); > if (ret < 0) { > goto out; > } > > - qemu_aio_set_fd_handler(sockfd, restart_co_req, NULL, have_co_req, co); > + qemu_aio_set_fd_handler(sockfd, restart_co_req, NULL, NULL, co); > > ret = qemu_co_recv(sockfd, hdr, sizeof(*hdr)); > if (ret < sizeof(*hdr)) { > There is another one in hw/dataplane/virtio-blk.c, btw. Paolo