qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 2/3] sheepdog: pass NULL for io_flush


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH 2/3] sheepdog: pass NULL for io_flush
Date: Fri, 29 Mar 2013 00:38:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 28/03/2013 22:52, Anthony Liguori ha scritto:
> Signed-off-by: Anthony Liguori <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]