summaryrefslogtreecommitdiffstats
path: root/async.c
diff options
context:
space:
mode:
authorPeter Maydell2015-06-12 19:04:14 +0200
committerPeter Maydell2015-06-12 19:04:14 +0200
commit8aeaa055f5d3d4e87bf870892ba301eae57bdc1d (patch)
treedae0e0c12a82bae3828894b240ff15b6101b1404 /async.c
parentMerge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into st... (diff)
parentqemu-iotests: expand test 093 to support group throttling (diff)
downloadqemu-8aeaa055f5d3d4e87bf870892ba301eae57bdc1d.tar.gz
qemu-8aeaa055f5d3d4e87bf870892ba301eae57bdc1d.tar.xz
qemu-8aeaa055f5d3d4e87bf870892ba301eae57bdc1d.zip
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Fri Jun 12 15:57:47 2015 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: qemu-iotests: expand test 093 to support group throttling throttle: Update throttle infrastructure copyright throttle: add the name of the ThrottleGroup to BlockDeviceInfo throttle: acquire the ThrottleGroup lock in bdrv_swap() throttle: Add throttle group support throttle: Add throttle group infrastructure tests throttle: Add throttle group infrastructure throttle: Extract timers from ThrottleState into a separate structure raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size Revert "iothread: release iothread around aio_poll" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'async.c')
-rw-r--r--async.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/async.c b/async.c
index 46d9e639d7..77d080d6f5 100644
--- a/async.c
+++ b/async.c
@@ -280,6 +280,12 @@ static void aio_timerlist_notify(void *opaque)
aio_notify(opaque);
}
+static void aio_rfifolock_cb(void *opaque)
+{
+ /* Kick owner thread in case they are blocked in aio_poll() */
+ aio_notify(opaque);
+}
+
AioContext *aio_context_new(Error **errp)
{
int ret;
@@ -297,7 +303,7 @@ AioContext *aio_context_new(Error **errp)
event_notifier_test_and_clear);
ctx->thread_pool = NULL;
qemu_mutex_init(&ctx->bh_lock);
- rfifolock_init(&ctx->lock, NULL, NULL);
+ rfifolock_init(&ctx->lock, aio_rfifolock_cb, ctx);
timerlistgroup_init(&ctx->tlg, aio_timerlist_notify, ctx);
return ctx;