qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED


From: Stefan Hajnoczi
Subject: Re: [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED
Date: Thu, 17 Feb 2022 13:56:08 +0000

On Tue, Feb 08, 2022 at 09:34:58AM -0500, Emanuele Giuseppe Esposito wrote:
> Same as AIO_WAIT_WHILE macro, but if we are in the Main loop
> do not release and then acquire ctx_ 's aiocontext.
> 
> Once all Aiocontext locks go away, this macro will replace
> AIO_WAIT_WHILE.
> 
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
>  include/block/aio-wait.h | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/include/block/aio-wait.h b/include/block/aio-wait.h
> index b39eefb38d..ff27fe4eab 100644
> --- a/include/block/aio-wait.h
> +++ b/include/block/aio-wait.h
> @@ -59,10 +59,11 @@ typedef struct {
>  extern AioWait global_aio_wait;
>  
>  /**
> - * AIO_WAIT_WHILE:
> + * _AIO_WAIT_WHILE:
>   * @ctx: the aio context, or NULL if multiple aio contexts (for which the
>   *       caller does not hold a lock) are involved in the polling condition.
>   * @cond: wait while this conditional expression is true
> + * @unlock: whether to unlock and then lock again @ctx

Please document that this only applies when waiting for another
AioContext from the main loop thread. It's ignored otherwise.

Attachment: signature.asc
Description: PGP signature


reply via email to

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