qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 09/12] vhdx: mark more functions as coroutine_fns and GRAPH_R


From: Kevin Wolf
Subject: Re: [PATCH 09/12] vhdx: mark more functions as coroutine_fns and GRAPH_RDLOCK
Date: Wed, 28 Jun 2023 09:40:52 +0200

Am 01.06.2023 um 13:51 hat Paolo Bonzini geschrieben:
> Mark functions as coroutine_fn when they are only called by other 
> coroutine_fns
> and they can suspend.  Change calls to co_wrappers to use the non-wrapped
> functions, which in turn requires adding GRAPH_RDLOCK annotations.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

> @@ -1036,8 +1037,9 @@ exit:
>  }
>  
>  /* Perform a log write, and then immediately flush the entire log */
> -int vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
> -                             void *data, uint32_t length, uint64_t offset)
> +int coroutine_fn GRAPH_RDLOCK
> +vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
> +                         void *data, uint32_t length, uint64_t offset)
>  {
>      int ret = 0;
>      VHDXLogSequence logs = { .valid = true,

This is a public function, so GRAPH_RDLOCK needs to move to the header
so that callers in other source files are actually checked. I can fix
this up while applying.

Kevin




reply via email to

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