Re: [PATCH v5 17/20] job: detect change of aiocontext within job coroutine

2022-03-08 Thread Stefan Hajnoczi
On Tue, Feb 08, 2022 at 09:35:10AM -0500, Emanuele Giuseppe Esposito wrote: > From: Paolo Bonzini > > We want to make sure access of job->aio_context is always done > under either BQL or job_mutex. The problem is that using > aio_co_enter(job->aiocontext, job->co) in job_start and job_enter_cond

[PATCH v5 17/20] job: detect change of aiocontext within job coroutine

2022-02-08 Thread Emanuele Giuseppe Esposito
From: Paolo Bonzini We want to make sure access of job->aio_context is always done under either BQL or job_mutex. The problem is that using aio_co_enter(job->aiocontext, job->co) in job_start and job_enter_cond makes the coroutine immediately resume, so we can't hold the job lock. And caching it