Commit 13726123 authored by Kevin Wolf's avatar Kevin Wolf
Browse files

blockjob: Fix coroutine thread after AioContext change



Commit 463e0be1 ('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: default avatarKevin Wolf <kwolf@redhat.com>
parent 4d231a38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)