summaryrefslogtreecommitdiff
path: root/include/block/aio.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2013-02-20 11:28:32 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-21 16:17:31 -0600
commit6b5f876252b7aeec43e319afdf17705f512be2bc (patch)
tree7204ef07bd2173232968669bec677596569d9ef6 /include/block/aio.h
parentd0c8d2c05f67a1a007d87fa3b99254abfa42d06d (diff)
downloadqemu-6b5f876252b7aeec43e319afdf17705f512be2bc.tar.gz
aio: convert aio_poll() to g_poll(3)
AioHandler already has a GPollFD so we can directly use its events/revents. Add the int pollfds_idx field to AioContext so we can map g_poll(3) results back to AioHandlers. Reuse aio_dispatch() to invoke handlers after g_poll(3). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361356113-11049-10-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/block/aio.h')
-rw-r--r--include/block/aio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/block/aio.h b/include/block/aio.h
index 8eda924599..5b54d383fc 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -63,6 +63,9 @@ typedef struct AioContext {
/* Used for aio_notify. */
EventNotifier notifier;
+
+ /* GPollFDs for aio_poll() */
+ GArray *pollfds;
} AioContext;
/* Returns 1 if there are still outstanding AIO requests; 0 otherwise */