Displaying 3 results from an estimated 3 matches for "67bd52a".
2019 May 22
0
[libnbd PATCH v2 2/5] commands: Allow for a command queue
...---*/
/* STATE MACHINE */ {
+ READY:
+ conn->reached_ready = true;
+ if (conn->cmds_to_issue)
+ SET_NEXT_STATE (%ISSUE_COMMAND.START);
+ return 0;
+
DEAD:
if (conn->sock) {
conn->sock->ops->close (conn->sock);
diff --git a/lib/internal.h b/lib/internal.h
index 67bd52a..2d6ad9d 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -175,6 +175,9 @@ struct nbd_connection {
/* Global flags from the server. */
uint16_t gflags;
+ /* True if we've ever reached the READY state. */
+ bool reached_ready;
+
/* When issuing a command, the first list contains c...
2019 May 22
0
[libnbd PATCH v2 1/5] lib: Refactor state event into command_common
...* problem? Probably it isn't. If it is, we could add a flag to
* the command struct to tell SEND_REQUEST not to add it to the
* in-flight list.
*/
- return nbd_internal_run (conn->h, conn, cmd_issue);
+ return 0;
}
diff --git a/lib/internal.h b/lib/internal.h
index 3f2b729..67bd52a 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -265,6 +265,12 @@ extern void nbd_internal_set_last_error (int errnum, char *error);
extern int nbd_internal_errno_of_nbd_error (uint32_t error);
extern const char *nbd_internal_name_of_nbd_cmd (uint16_t type);
+/* rw.c */
+extern struct comman...
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