Displaying 2 results from an estimated 2 matches for "a4eecbd".
2019 May 22
0
[libnbd PATCH v2 2/5] commands: Allow for a command queue
...s draining.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
generator/states.c | 6 ++++++
lib/internal.h | 3 +++
lib/rw.c | 24 ++++++++++++++++++++----
3 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/generator/states.c b/generator/states.c
index 202c305..a4eecbd 100644
--- a/generator/states.c
+++ b/generator/states.c
@@ -110,6 +110,12 @@ send_from_wbuf (struct nbd_connection *conn)
/*----- End of prologue. -----*/
/* STATE MACHINE */ {
+ READY:
+ conn->reached_ready = true;
+ if (conn->cmds_to_issue)
+ SET_NEXT_STATE (%ISSUE_COMMAND.START);...
2019 May 22
10
[libnbd PATCH v2 0/5] Avoid deadlock with in-flight commands
On v1, we discussed whether cmds_to_issue needed to be a list, since
it never had more than one element. I played with the idea of making
it a list, and allowing the client to queue up new commands regardless
of whether the state machine is currently in READY. I also polished up
the tmp demo into a bit more full-fledged example file, worth
including since it also let me discover a hard-to-hit race