aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-05-03 19:17:43 +0200
committerKevin Wolf <kwolf@redhat.com>2019-05-10 16:45:40 +0200
commit13726123ba916dd8ead23156a61db8d2c8bd42e8 (patch)
treedf31043b6efe4244e1219f5a504c1f5510a9d61e
parent4d231a384c5d72491e6ddc8006d6be929ca6c609 (diff)
downloadqemu-13726123ba916dd8ead23156a61db8d2c8bd42e8.zip
qemu-13726123ba916dd8ead23156a61db8d2c8bd42e8.tar.gz
qemu-13726123ba916dd8ead23156a61db8d2c8bd42e8.tar.bz2
blockjob: Fix coroutine thread after AioContext change
Commit 463e0be10 ('blockjob: add AioContext attached callback') tried to make block jobs robust against AioContext changes of their main node, but it never made sure that the job coroutine actually runs in the new thread. Instead of waking up the job coroutine in whatever thread it ran before, let's always pass the AioContext where it should be running now. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--job.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/job.c b/job.c
index da8e4b7..2167d53 100644
--- a/job.c
+++ b/job.c
@@ -432,7 +432,7 @@ void job_enter_cond(Job *job, bool(*fn)(Job *job))
timer_del(&job->sleep_timer);
job->busy = true;
job_unlock();
- aio_co_wake(job->co);
+ aio_co_enter(job->aio_context, job->co);
}
void job_enter(Job *job)