[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 11/20] block/mirror.c: use of job helpers in drivers to av
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v5 11/20] block/mirror.c: use of job helpers in drivers to avoid TOC/TOU |
Date: |
Thu, 17 Feb 2022 16:53:02 +0000 |
On Tue, Feb 08, 2022 at 09:35:04AM -0500, Emanuele Giuseppe Esposito wrote:
> Once job lock is used and aiocontext is removed, mirror has
> to perform job operations under the same critical section,
> using the helpers prepared in previous commit.
>
> Note: at this stage, job_{lock/unlock} and job lock guard macros
> are *nop*.
>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
> block/mirror.c | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
My understanding is that MirrorBlockJob itself does need a lock because
it's only access from the coroutines - and they run in only one thread.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- [PATCH v5 13/20] job.h: rename job API functions called with job_mutex held, (continued)
- [PATCH v5 13/20] job.h: rename job API functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 08/20] jobs: protect jobs with job_lock/unlock, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 19/20] job.c: enable job lock/unlock and remove Aiocontext locks, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 20/20] block_job_query: remove atomic read, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 18/20] jobs: protect job.aio_context with BQL and job_mutex, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 12/20] jobs: rename static functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 11/20] block/mirror.c: use of job helpers in drivers to avoid TOC/TOU, Emanuele Giuseppe Esposito, 2022/02/08
- Re: [PATCH v5 11/20] block/mirror.c: use of job helpers in drivers to avoid TOC/TOU,
Stefan Hajnoczi <=
- [PATCH v5 15/20] job.h: define unlocked functions, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 06/20] jobs: remove aiocontext locks since the functions are under BQL, Emanuele Giuseppe Esposito, 2022/02/08