Il 28/03/2013 22:52, Anthony Liguori ha scritto: > Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> > --- > 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