On Tue, Apr 12, 2022 at 09:42:04PM +0200, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  block/nbd.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/block/nbd.c b/block/nbd.c
> index 8954243f50..8297da7e89 100644
> --- a/block/nbd.c
> +++ b/block/nbd.c
> @@ -82,12 +82,18 @@ typedef struct BDRVNBDState {
>      NBDClientRequest requests[MAX_NBD_REQUESTS];
>      QEMUTimer *reconnect_delay_timer;
>  
> +    /* Protects sending data on the socket.  */
>      CoMutex send_mutex;
> +
> +    /*
> +     * Protects receiving reply headers from the socket, as well as the
> +     * fields reply, requests[].receiving and requests[].reply_possible
> +     */
>      CoMutex receive_mutex;
> +    NBDReply reply;
>  
>      QEMUTimer *open_timer;
>  
> -    NBDReply reply;
>      BlockDriverState *bs;

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply via email to