aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/nbd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/block/nbd.c b/block/nbd.c
index 3bfcf4d..6085ab1 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -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 */