qemu-block
[Top][All Lists]
Advanced

[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>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]