aboutsummaryrefslogtreecommitdiff
path: root/aio-posix.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-07-09 11:53:04 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-08-29 10:46:58 +0100
commit3672fa50837c1700deb1f86f0068c22c7e49aa22 (patch)
treeb9988cd1991b5fc542413bd2dac0586396af8908 /aio-posix.c
parenta398dea34c62b238e714bb4c3a968b4ca11e256b (diff)
AioContext: run bottom halves after polling
Make the dispatching phase the same before blocking and afterwards. The next patch will make aio_dispatch public and use it directly for the GSource case, instead of aio_poll. aio_poll can then be simplified heavily. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'aio-posix.c')
-rw-r--r--aio-posix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/aio-posix.c b/aio-posix.c
index 55706f8205..798a3ff532 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -264,6 +264,10 @@ bool aio_poll(AioContext *ctx, bool blocking)
/* Run dispatch even if there were no readable fds to run timers */
aio_set_dispatching(ctx, true);
+ if (aio_bh_poll(ctx)) {
+ progress = true;
+ }
+
if (aio_dispatch(ctx)) {
progress = true;
}