Re: [PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex

2022-02-24 Thread Emanuele Giuseppe Esposito
On 17/02/2022 15:20, Stefan Hajnoczi wrote: > On Tue, Feb 08, 2022 at 09:35:00AM -0500, Emanuele Giuseppe Esposito wrote: >> static void job_exit(void *opaque) >> { >> Job *job = (Job *)opaque; >> AioContext *ctx; >> +JOB_LOCK_GUARD(); >> >> job_ref(job); >> aio_conte

Re: [PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex

2022-02-17 Thread Stefan Hajnoczi
On Tue, Feb 08, 2022 at 09:35:00AM -0500, Emanuele Giuseppe Esposito wrote: > static void job_exit(void *opaque) > { > Job *job = (Job *)opaque; > AioContext *ctx; > +JOB_LOCK_GUARD(); > > job_ref(job); > aio_context_acquire(job->aio_context); The previous patch said:

[PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex

2022-02-08 Thread Emanuele Giuseppe Esposito
In preparation to the job_lock/unlock usage, create _locked duplicates of some functions, since they will be sometimes called with job_mutex held (mostly within job.c), and sometimes without (mostly from JobDrivers using the job API). Therefore create a _locked version of such function, so that it