[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/13] nbd: document what is protected by the CoMutexes
From: |
Eric Blake |
Subject: |
[PULL 12/13] nbd: document what is protected by the CoMutexes |
Date: |
Tue, 26 Apr 2022 15:15:13 -0500 |
From: Paolo Bonzini <pbonzini@redhat.com>
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>
---
block/nbd.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/block/nbd.c b/block/nbd.c
index 3bfcf4d97c42..6085ab1d2c13 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 */
--
2.35.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PULL 12/13] nbd: document what is protected by the CoMutexes,
Eric Blake <=