[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 2/3] sheepdog: pass NULL for io_flush
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [RFC PATCH 2/3] sheepdog: pass NULL for io_flush |
Date: |
Thu, 28 Mar 2013 16:52:29 -0500 |
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)) {
--
1.8.0