Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-19 Thread Vladimir Sementsov-Ogievskiy
On 8/18/22 10:46, Emanuele Giuseppe Esposito wrote: Am 17/08/2022 um 20:54 schrieb Vladimir Sementsov-Ogievskiy: On 8/16/22 15:52, Emanuele Giuseppe Esposito wrote:    } @@ -501,8 +481,12 @@ void job_unref_locked(Job *job)> assert(!job->txn);      if (job->driver->free) { + 

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-18 Thread Emanuele Giuseppe Esposito
Am 17/08/2022 um 20:54 schrieb Vladimir Sementsov-Ogievskiy: > On 8/16/22 15:52, Emanuele Giuseppe Esposito wrote:    } @@ -501,8 +481,12 @@ void job_unref_locked(Job *job)> assert(!job->txn);      if (job->driver->free) { +    AioContext *aio_context =

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/16/22 15:52, Emanuele Giuseppe Esposito wrote:   } @@ -501,8 +481,12 @@ void job_unref_locked(Job *job)> assert(!job->txn);     if (job->driver->free) { +    AioContext *aio_context = job->aio_context;   job_unlock(); +    /* FIXME: aiocontext lock is

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-17 Thread Emanuele Giuseppe Esposito
Am 05/08/2022 um 15:01 schrieb Kevin Wolf: > Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: >> Change the job_{lock/unlock} and macros to use job_mutex. >> >> Now that they are not nop anymore, remove the aiocontext >> to avoid deadlocks. > > Okay, so this is the big bad

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-16 Thread Emanuele Giuseppe Esposito
> >>   } >> @@ -501,8 +481,12 @@ void job_unref_locked(Job *job)>   >> assert(!job->txn); >>     if (job->driver->free) { >> +    AioContext *aio_context = job->aio_context; >>   job_unlock(); >> +    /* FIXME: aiocontext lock is required because cb

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-16 Thread Emanuele Giuseppe Esposito
Am 27/07/2022 um 17:53 schrieb Vladimir Sementsov-Ogievskiy: >>    * job_lock: >> @@ -672,7 +673,7 @@ void job_user_cancel_locked(Job *job, bool force, >> Error **errp); >>    * Returns the return value from the job if the job actually completed >>    * during the call, or -ECANCELED if it was

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Change the job_{lock/unlock} and macros to use job_mutex. > > Now that they are not nop anymore, remove the aiocontext > to avoid deadlocks. Okay, so this is the big bad patch where we need to verify the completeness of all

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other

[PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-07-25 Thread Emanuele Giuseppe Esposito
Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other function too, reduce the locking section as much as