search for: notifywrit

Displaying 20 results from an estimated 30 matches for "notifywrit".

Did you mean: notifywrite
2019 May 21
0
[libnbd PATCH 3/3] states: Allow in-flight read while writing next command
...erator index a4ad362..23b3cbf 100755 --- a/generator/generator +++ b/generator/generator @@ -634,7 +634,15 @@ and issue_command_state_machine = [ default_state with name = "SEND_REQUEST"; comment = "Sending a request to the remote server"; - external_events = [ NotifyWrite, "" ]; + external_events = [ NotifyWrite, ""; + NotifyRead, "PAUSE_SEND_REQUEST" ]; + }; + + State { + default_state with + name = "PAUSE_SEND_REQUEST"; + comment = "Interrupt send request to receive an earlier comma...
2019 May 22
0
[libnbd PATCH v2 4/5] states: Allow in-flight read while writing next command
...uot;Begin issuing a command to the remote server"; external_events = []; }; @@ -634,7 +628,15 @@ and issue_command_state_machine = [ default_state with name = "SEND_REQUEST"; comment = "Sending a request to the remote server"; - external_events = [ NotifyWrite, "" ]; + external_events = [ NotifyWrite, ""; + NotifyRead, "PAUSE_SEND_REQUEST" ]; + }; + + State { + default_state with + name = "PAUSE_SEND_REQUEST"; + comment = "Interrupt send request to receive an earlier comma...
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
2019 May 21
0
[libnbd PATCH 2/3] states: Split ISSUE_COMMAND.SEND_REQUEST
...++++++++++++++------------ 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/generator/generator b/generator/generator index a1bf41d..a4ad362 100755 --- a/generator/generator +++ b/generator/generator @@ -637,12 +637,26 @@ and issue_command_state_machine = [ external_events = [ NotifyWrite, "" ]; }; + State { + default_state with + name = "PREPARE_WRITE_PAYLOAD"; + comment = "Prepare the write payload to send to the remote server"; + external_events = []; + }; + State { default_state with name = "SEND_WRITE_PAYLOAD&qu...
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 19
0
[libnbd PATCH 4/4] states: Add NBD_OPT_EXPORT_NAME handling
...RT"; + comment = "Try to send newstyle NBD_OPT_EXPORT_NAME to end handshake"; + external_events = []; + }; + + State { + default_state with + name = "SEND"; + comment = "Send newstyle NBD_OPT_EXPORT_NAME to end handshake"; + external_events = [ NotifyWrite, "" ]; + }; + + State { + default_state with + name = "SEND_EXPORT"; + comment = "Send newstyle NBD_OPT_EXPORT_NAME export name"; + external_events = [ NotifyWrite, "" ]; + }; + + State { + default_state with + name = "RECV_REPLY&q...
2019 May 22
12
[libnbd PATCH v3 0/7] Avoid deadlock with in-flight commands
Since v2: - rebase to Rich's new API calls - more refactoring in patch 1 (retitled) - new patches 3 and 4 - fix data corruption in patch 6 (was 4) - more tweaks to the reproducer example (including using new API from 3) Eric Blake (7): lib: Refactor command_common() to do more common work commands: Allow for a command queue commands: Expose FIFO ordering of server completions
2019 Oct 18
0
[PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...quot;, (1, 2); + "connect_vsock", (1, 2); + "aio_connect_vsock", (1, 2); (* These calls are proposed for a future version of libnbd, but * have not been added to any released version so far. @@ -3151,7 +3196,7 @@ end = struct let all_external_events = [NotifyRead; NotifyWrite; CmdCreate; - CmdConnectSockAddr; CmdConnectUnix; CmdConnectTCP; + CmdConnectSockAddr; CmdConnectUnix; CmdConnectVSock; CmdConnectTCP; CmdConnectCommand; CmdConnectSA; CmdConnectSocket; CmdIssue] @@ -3161,6 +3206,7 @@ let string_of_external_event = function | CmdCreate -> &...
2019 Sep 26
0
[PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...connect_socket_activation", (1, 2); + "aio_connect_socket_activation", (1, 2); (* These calls are proposed for a future version of libnbd, but * have not been added to any released version so far. @@ -3035,7 +3078,8 @@ end = struct let all_external_events = [NotifyRead; NotifyWrite; CmdCreate; - CmdConnectSockAddr; CmdConnectUnix; CmdConnectTCP; CmdConnectCommand; + CmdConnectSockAddr; CmdConnectUnix; CmdConnectTCP; + CmdConnectCommand; CmdConnectSA; CmdIssue] let string_of_external_event = function @@ -3046,6 +3090,7 @@ let string_of_external_event = functi...
2019 May 19
5
[libnbd PATCH 0/4] Various interop fixes
Some of these affect attempts to connect to older qemu-nbd versions, some of them were triggered by manual edits to qemu-nbd source code to provoke various other compliant (if uncommon) server behaviors. Eric Blake (4): starttls: Skip error payload if falling back to unencrypted states: Reject payload to NBD_REP_ACK meta-context: Skip error payload if server lacks meta_context states: Add
2020 Jul 24
4
[libnbd PATCH 0/3] Expose server block size constraints
Necessary when writing a client that wants to avoid unnecessary EINVAL errors from sending unaligned requests. At some point, we may want to add synchronous convenience API wrappers that do request splitting or read-modify-write to obey server constraints while still appearing to the library client as accepting any possible request. But such a wrapper should only be synchronous and not copied to
2019 Oct 18
5
[PATCH libnbd 0/2] api: Add support for AF_VSOCK.
This is a series of patches to libnbd and nbdkit adding AF_VSOCK support. On the host side it allows you to start an nbdkit instance which listens on a virtio-vsock socket: $ ./nbdkit -fv --vsock memory 1G ... nbdkit: debug: bound to vsock 2:10809 On the guest side you can then use libnbd to connect to the server: $ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c
2019 Sep 30
0
[PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...connect_socket_activation", (1, 2); + "aio_connect_socket_activation", (1, 2); (* These calls are proposed for a future version of libnbd, but * have not been added to any released version so far. @@ -3036,7 +3079,8 @@ end = struct let all_external_events = [NotifyRead; NotifyWrite; CmdCreate; - CmdConnectSockAddr; CmdConnectUnix; CmdConnectTCP; CmdConnectCommand; + CmdConnectSockAddr; CmdConnectUnix; CmdConnectTCP; + CmdConnectCommand; CmdConnectSA; CmdIssue] let string_of_external_event = function @@ -3047,6 +3091,7 @@ let string_of_external_event = functi...
2019 Jun 19
4
[libnbd PATCH] states: Never block state machine inside REPLY
When processing a server reply within the REPLY subgroup, we will often hit a situation where recv() requires us to block until the next NotifyRead. But since NotifyRead is the only permitted external action while in this group, we are effectively blocking CmdIssue and NotifyWrite events from happening until the server finishes the in-progress reply, even though those events have no strict dependence on the server's progress. The solution is similar to commit dd101bde - any time we need to pause the reply cycle, we need to save enough information to recall where we lef...
2020 Jul 10
0
[RFC nbdkit PATCH] server: Allow --run with --vsock
...uri="nbd+vsock://1:1082294412" libnbd: debug: nbdsh: nbd_connect_uri: event CmdConnectSockAddr: START -> CONNECT.START libnbd: debug: nbdsh: nbd_connect_uri: poll start: events=4 libnbd: debug: nbdsh: nbd_connect_uri: poll end: r=1 revents=c libnbd: debug: nbdsh: nbd_connect_uri: event NotifyWrite: CONNECT.START -> CONNECT.CONNECTING libnbd: debug: nbdsh: nbd_connect_uri: transition: CONNECT.CONNECTING -> DEAD libnbd: debug: nbdsh: nbd_connect_uri: leave: error="nbd_connect_uri: connect: Connection reset by peer" but when I try the same from the command line in isolation:...
2020 Aug 14
0
[libnbd PATCH v2 06/13] api: Add nbd_opt_abort and nbd_aio_opt_abort
...name = "PREPARE_OPT_ABORT"; + comment = "Prepare to send NBD_OPT_ABORT"; + external_events = []; + }; + + State { + default_state with + name = "SEND_OPT_ABORT"; + comment = "Send NBD_OPT_ABORT to end negotiation"; + external_events = [ NotifyWrite, "" ]; + }; + + State { + default_state with + name = "SEND_OPTION_SHUTDOWN"; + comment = "Sending write shutdown notification to the remote server"; + external_events = [ NotifyWrite, "" ]; + }; + (* When option parsing has successfully fi...
2019 Jun 08
0
Re: [PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
...problem I can think of at the moment is the usual one with interrupts which is that second and subsequent interrupts are lost if the first interrupt hasn't been processed. However for the external events we have at the moment: | NotifyRead (* fd becomes ready to read *) | NotifyWrite (* fd becomes ready to write *) | CmdCreate (* [nbd_create] function called *) | CmdConnectSockAddr (* [nbd_aio_connect] function called *) | CmdConnectUnix (* [nbd_aio_connect_unix] *) | CmdConnectTCP (* [nbd_aio_connec...
2019 Sep 11
1
Re: [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
...mdConnectUnix: START -> CONNECT_UNIX.START libnbd: debug: nbd5: nbd_connect_uri: transition: CONNECT_UNIX.START -> CONNECT.START libnbd: debug: nbd5: nbd_connect_uri: poll start: events=4 libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=4 libnbd: debug: nbd5: nbd_connect_uri: event NotifyWrite: CONNECT.START -> CONNECT.CONNECTING libnbd: debug: nbd5: nbd_connect_uri: transition: CONNECT.CONNECTING -> MAGIC.START libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.START -> MAGIC.RECV_MAGIC libnbd: debug: nbd5: nbd_connect_uri: poll start: events=1 nbdkit: debug: accepted con...
2019 Oct 04
0
[PATCH libnbd 3/4] api: Add nbd_connect_socket.
..._activation", (1, 2); + "connect_socket", (1, 2); + "aio_connect_socket", (1, 2); (* These calls are proposed for a future version of libnbd, but * have not been added to any released version so far. @@ -3117,7 +3152,7 @@ let all_external_events = [NotifyRead; NotifyWrite; CmdCreate; CmdConnectSockAddr; CmdConnectUnix; CmdConnectTCP; - CmdConnectCommand; CmdConnectSA; + CmdConnectCommand; CmdConnectSA; CmdConnectSocket; CmdIssue] let string_of_external_event = function @@ -3129,6 +3164,7 @@ let string_of_external_event = function | CmdConnectT...
2019 Sep 26
5
[PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
If the user calls nbd_kill_subprocess, we shouldn't kill the process again when we close the handle (since the process has likely gone and we might be killing a different process). --- lib/handle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/handle.c b/lib/handle.c index 2af25fe..5ad818e 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -315,6 +315,8 @@