Statistics
| Branch: | Revision:

root / aio-posix.c @ f487b677

History | View | Annotate | Download (6.7 kB)

# Date Author Comment
d0c8d2c0 02/22/2013 12:17 am Stefan Hajnoczi

aio: extract aio_dispatch() from aio_poll()

We will need to loop over AioHandlers calling >io_read()/>io_write()
when aio_poll() is converted from select(2) to g_poll(2).

Luckily the code for this already exists, extract it into the new
aio_dispatch() function....

6b5f8762 02/22/2013 12:17 am Stefan Hajnoczi

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)....

b5a01a70 02/22/2013 12:17 am Stefan Hajnoczi

aio: support G_IO_HUP and G_IO_ERR

aio-posix.c could not take advantage of G_IO_HUP and G_IO_ERR because
select(2) does not have equivalent events. Now that g_poll(3) is used
we can support G_IO_HUP and G_IO_ERR.

Signed-off-by: Stefan Hajnoczi <>...

2ea9b58f 01/17/2013 11:51 am Kevin Wolf

aio: Fix return value of aio_poll()

aio_poll() must return true if any work is still pending, even if it
didn't make progress, so that bdrv_drain_all() doesn't stop waiting too
early. The possibility of stopping early occasionally lead to a failed
assertion in bdrv_drain_all(), when some in-flight request was missed...

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

737e150e 12/19/2012 09:31 am Paolo Bonzini

block: move include files to include/block/

Signed-off-by: Paolo Bonzini <>

f42b2207 10/30/2012 10:30 am Paolo Bonzini

aio: add Win32 implementation

The Win32 implementation will only accept EventNotifiers, thus a few
drivers are disabled under Windows. EventNotifiers are a good match
for the GSource implementation, too, because the Win32 port of glib
allows to place their HANDLEs in a GPollFD....

e3713e00 10/30/2012 10:30 am Paolo Bonzini

aio: make AioContexts GSources

This lets AioContexts be used (optionally) with a glib main loop.

Signed-off-by: Paolo Bonzini <>

7ed2b24c 10/30/2012 10:30 am Paolo Bonzini

aio: call aio_notify after setting I/O handlers

In the current code, this is done by qemu_set_fd_handler2, which is
called by qemu_aio_set_fd_handler. We need to keep the same behavior
even after removing the call to qemu_set_fd_handler2.

Reviewed-by: Anthony Liguori <>...