nbd: document what is protected by the CoMutexes

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220414175756.671165-10-pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Paolo Bonzini 2022-04-14 19:57:56 +02:00 committed by Eric Blake
parent a80a9a1c73
commit 620c5cb5da

View File

@ -81,12 +81,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 and requests[].receiving
*/
CoMutex receive_mutex;
NBDReply reply;
QEMUTimer *open_timer;
NBDReply reply;
BlockDriverState *bs;
/* Connection parameters */