diff options
| author | Paolo Bonzini | 2017-02-13 14:52:29 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi | 2017-02-21 12:14:08 +0100 |
| commit | 2f47da5f7f88d3966a2cb33cc9de53f134fea367 (patch) | |
| tree | 787ad7109e1add804620bd3dedbc81d36073fd07 /block/throttle-groups.c | |
| parent | aio: push aio_context_acquire/release down to dispatching (diff) | |
| download | qemu-2f47da5f7f88d3966a2cb33cc9de53f134fea367.tar.gz qemu-2f47da5f7f88d3966a2cb33cc9de53f134fea367.tar.xz qemu-2f47da5f7f88d3966a2cb33cc9de53f134fea367.zip | |
block: explicitly acquire aiocontext in timers that need it
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170213135235.12274-13-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/throttle-groups.c')
| -rw-r--r-- | block/throttle-groups.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/throttle-groups.c b/block/throttle-groups.c index 17b2efb7c7..aade5def39 100644 --- a/block/throttle-groups.c +++ b/block/throttle-groups.c @@ -416,7 +416,9 @@ static void timer_cb(BlockBackend *blk, bool is_write) qemu_mutex_unlock(&tg->lock); /* Run the request that was waiting for this timer */ + aio_context_acquire(blk_get_aio_context(blk)); empty_queue = !qemu_co_enter_next(&blkp->throttled_reqs[is_write]); + aio_context_release(blk_get_aio_context(blk)); /* If the request queue was empty then we have to take care of * scheduling the next one */ |
