summaryrefslogtreecommitdiff
path: root/aio-posix.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-04-22 16:17:12 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-04-22 16:17:12 +0100
commit53343338a6e7b83777b82803398572b40afc8c0f (patch)
treea6b16ffcb414941d0cd6c63d0c7c3050a3a73451 /aio-posix.c
parentee1e0f8e5d3682c561edcdceccff72b9d9b16d8b (diff)
parentab27c3b5e7408693dde0b565f050aa55c4a1bcef (diff)
downloadqemu-53343338a6e7b83777b82803398572b40afc8c0f.tar.gz
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Mirror block job fixes for 2.6.0-rc4 # gpg: Signature made Fri 22 Apr 2016 15:46:41 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: mirror: Workaround for unexpected iohandler events during completion aio-posix: Skip external nodes in aio_dispatch virtio: Mark host notifiers as external event-notifier: Add "is_external" parameter iohandler: Introduce iohandler_get_aio_context Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'aio-posix.c')
-rw-r--r--aio-posix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/aio-posix.c b/aio-posix.c
index 7fd565fbde..6006122e0b 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -282,10 +282,12 @@ bool aio_pending(AioContext *ctx)
int revents;
revents = node->pfd.revents & node->pfd.events;
- if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && node->io_read) {
+ if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && node->io_read &&
+ aio_node_check(ctx, node->is_external)) {
return true;
}
- if (revents & (G_IO_OUT | G_IO_ERR) && node->io_write) {
+ if (revents & (G_IO_OUT | G_IO_ERR) && node->io_write &&
+ aio_node_check(ctx, node->is_external)) {
return true;
}
}
@@ -323,6 +325,7 @@ bool aio_dispatch(AioContext *ctx)
if (!node->deleted &&
(revents & (G_IO_IN | G_IO_HUP | G_IO_ERR)) &&
+ aio_node_check(ctx, node->is_external) &&
node->io_read) {
node->io_read(node->opaque);
@@ -333,6 +336,7 @@ bool aio_dispatch(AioContext *ctx)
}
if (!node->deleted &&
(revents & (G_IO_OUT | G_IO_ERR)) &&
+ aio_node_check(ctx, node->is_external) &&
node->io_write) {
node->io_write(node->opaque);
progress = true;