aio: add .io_poll_begin/end() callbacks
commit684e508c23d28af8d6ed2c62738a0f60447c8274
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 1 Dec 2016 19:26:49 +0000 (1 19:26 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 3 Jan 2017 16:38:50 +0000 (3 16:38 +0000)
treeacf9dd6f848c5419b756d30124f9727dafb3553d
parentaff8fd18f1786fc5af259a9bc0077727222f51ca
aio: add .io_poll_begin/end() callbacks

The begin and end callbacks can be used to prepare for the polling loop
and clean up when polling stops.  Note that they may only be called once
for multiple aio_poll() calls if polling continues to succeed.  Once
polling fails the end callback is invoked before aio_poll() resumes file
descriptor monitoring.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20161201192652.9509-11-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio-posix.c
aio-win32.c
include/block/aio.h