History | View | Annotate | Download (2.1 kB)
aio: return "AIO in progress" state from qemu_aio_wait
The definition of when qemu_aio_flush should loop is much simplerthan it looks. It just has to call qemu_aio_wait until it makesno progress and all flush callbacks return false. qemu_aio_waitis the logical place to tell the caller about this....
aio: remove process_queue callback and qemu_aio_process_queue
Both unused after the previous patch.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
aio: move BlockDriverAIOCB to qemu-aio.h
And remove several block_int.h inclusions that should not be there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Add qemu_aio_process_queue()
We'll leave some AIO completions unhandled when we can't call the callback.qemu_aio_process_queue() is used later to run any callbacks that are left andcan be run then.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fix qemu_aio_flush
qemu_aio_wait by invoking the bh or one of the aio completioncallbacks, could end up submitting new pending aio, breaking theinvariant that qemu_aio_flush returns only when no pending aio isoutstanding (possibly a problem for migration as such)....
Refactor AIO to allow multiple AIO implementations
This patch refactors the AIO layer to allow multiple AIO implementations. It'sonly possible because of the recent signalfd() patch.
Right now, the AIO infrastructure is pretty specific to the block raw backend....