[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 07/20] job.h: add _locked duplicates for job API functions
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex |
Date: |
Thu, 17 Feb 2022 14:20:22 +0000 |
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:
We don't want this, as job_lock must be taken inside the AioContext
lock, and taking it outside would cause deadlocks.
Therefore this looks like a deadlock.
signature.asc
Description: PGP signature
- [PATCH v5 02/20] job.h: categorize fields in struct Job, (continued)
[PATCH v5 04/20] job.c: move inner aiocontext lock in callbacks, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex, Emanuele Giuseppe Esposito, 2022/02/08
- Re: [PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex,
Stefan Hajnoczi <=
[PATCH v5 17/20] job: detect change of aiocontext within job coroutine, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 03/20] job.c: API functions not used outside should be static, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 14/20] block_job: rename block_job functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 09/20] jobs: add job lock in find_* functions, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 10/20] jobs: use job locks also in the unit tests, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 16/20] commit and mirror: create new nodes using bdrv_get_aio_context, and not the job aiocontext, Emanuele Giuseppe Esposito, 2022/02/08