Am 18/09/2022 um 19:12 schrieb Emanuele Giuseppe Esposito:
>> In replication_stop, we call job_cancel_sync() inside
>> aio_context_acquire - aio_context_release section. Should it be fixed?

> I don't think it breaks anything. The question is: what is the
> aiocontext there protecting? Do we need it? I have no idea.

Ok Paolo reminded me that job_cancel_sync() calls
AIO_WAIT_WHILE_UNLOCKED. This means that it indeed needs to be wrapped
in an aiocontext release() + acquire() block.

>> Another question, sometimes you move job_start out of
>> aio-context-acquire critical section, sometimes not. As I understand,
>> it's of for job_start to be called both with acquired aio-context or not
>> acquired?
>>
> Same as above, job_start does not need the aiocontext to be taken
> (otherwise job_lock would be useless).

I still think here it does not matter if the aiocontext is taken or not.

> Thank you,
> Emanuele


Reply via email to