diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-04-12 14:00:55 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-04-19 16:50:49 +0200 |
commit | bcdc18578d5b41180db2e17baa7563c5f05b39ee (patch) | |
tree | a4a818afaeed5c47f3f95786028b9aef041cfbcf /qemu-aio.h | |
parent | bafbd6a1c69fef73500309dc31c86984c6d22b43 (diff) |
aio: return "AIO in progress" state from qemu_aio_wait
The definition of when qemu_aio_flush should loop is much simpler
than it looks. It just has to call qemu_aio_wait until it makes
no progress and all flush callbacks return false. qemu_aio_wait
is the logical place to tell the caller about this.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-aio.h')
-rw-r--r-- | qemu-aio.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qemu-aio.h b/qemu-aio.h index 0fc84093c0..bfdd35f02c 100644 --- a/qemu-aio.h +++ b/qemu-aio.h @@ -48,8 +48,10 @@ void qemu_aio_flush(void); /* Wait for a single AIO completion to occur. This function will wait * until a single AIO event has completed and it will ensure something * has moved before returning. This can issue new pending aio as - * result of executing I/O completion or bh callbacks. */ -void qemu_aio_wait(void); + * result of executing I/O completion or bh callbacks. + * + * Return whether there is still any pending AIO operation. */ +bool qemu_aio_wait(void); /* Register a file descriptor and associated callbacks. Behaves very similarly * to qemu_set_fd_handler2. Unlike qemu_set_fd_handler2, these callbacks will |