search for: 9dfce97

Displaying 5 results from an estimated 5 matches for "9dfce97".

2019 May 21
0
[libnbd PATCH 1/3] commands: Preserve FIFO ordering
...xt = NULL; + if (conn->cmds_done) { + prev_cmd = conn->cmds_done; + while (prev_cmd->next) + prev_cmd = prev_cmd->next; + prev_cmd->next = cmd; + } + else + conn->cmds_done = cmd; SET_NEXT_STATE (%.READY); return 0; diff --git a/lib/rw.c b/lib/rw.c index 9dfce97..fa7dc52 100644 --- a/lib/rw.c +++ b/lib/rw.c @@ -246,7 +246,7 @@ command_common (struct nbd_connection *conn, uint16_t flags, uint16_t type, uint64_t offset, uint64_t count, void *data) { - struct command_in_flight *cmd; + struct command_in_flight *cmd, *prev_c...
2019 May 22
0
[libnbd PATCH v2 1/5] lib: Refactor state event into command_common
...uint16_t flags, uint16_t type, + uint64_t offset, + uint64_t count, void *data); + /* socket.c */ struct socket *nbd_internal_socket_create (int fd); diff --git a/lib/rw.c b/lib/rw.c index 9dfce97..a7587e9 100644 --- a/lib/rw.c +++ b/lib/rw.c @@ -241,7 +241,7 @@ nbd_unlocked_block_status (struct nbd_handle *h, return r == -1 ? -1 : 0; } -static struct command_in_flight * +struct command_in_flight * command_common (struct nbd_connection *conn, uint16_t flags, uint16_t t...
2019 May 22
8
[PATCH libnbd v2 0/6] Test connection states.
Patch 1/6 was posted before and I didn't change it: https://www.redhat.com/archives/libguestfs/2019-May/thread.html#00134 That doesn't necessarily mean I shouldn't change it, I'm posting it again because the other patches depend on it. The main change in this series is we add three new API functions: nbd_aio_is_created - connection has just been created
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
2019 May 21
9
[libnbd PATCH 0/3] Avoid deadlock with in-flight commands
This might not be the final solution, but it certainly seems to solve a deadlock for me that I could trigger by using 'nbdkit --filter=noparallel memory 512k' and calling nbd_aio_pread for a request larger than 256k (enough for the Linux kernel to block the server until libnbd read()s), immediately followed by nbd_aio_pwrite for a request larger than 256k (enough to block libnbd until the