search for: default_state

Displaying 20 results from an estimated 43 matches for "default_state".

2019 Jun 25
0
Re: [libnbd PATCH] states: Never block state machine inside REPLY
...| 1 + > 5 files changed, 83 insertions(+), 12 deletions(-) > > diff --git a/generator/generator b/generator/generator > index 630260b..68a4fdf 100755 > --- a/generator/generator > +++ b/generator/generator > @@ -682,14 +682,14 @@ and reply_state_machine = [ > default_state with > name = "START"; > comment = "Prepare to receive a reply from the remote server"; > - external_events = [ NotifyRead, "" ]; > + external_events = []; > }; > > State { > default_state with > name = "...
2019 Jun 19
4
[libnbd PATCH] states: Never block state machine inside REPLY
...+++++++++- lib/internal.h | 1 + 5 files changed, 83 insertions(+), 12 deletions(-) diff --git a/generator/generator b/generator/generator index 630260b..68a4fdf 100755 --- a/generator/generator +++ b/generator/generator @@ -682,14 +682,14 @@ and reply_state_machine = [ default_state with name = "START"; comment = "Prepare to receive a reply from the remote server"; - external_events = [ NotifyRead, "" ]; + external_events = []; }; State { default_state with name = "RECV_REPLY"; comment = "Receiv...
2019 May 22
0
[libnbd PATCH v2 4/5] states: Allow in-flight read while writing next command
...b/internal.h | 1 + 3 files changed, 43 insertions(+), 9 deletions(-) diff --git a/generator/generator b/generator/generator index a4ad362..5c84a5d 100755 --- a/generator/generator +++ b/generator/generator @@ -620,12 +620,6 @@ and issue_command_state_machine = [ State { default_state with name = "START"; - (* XXX There's a possible deadlock here if a server cannot - * handle multiple requests pipelined on a single connection. - * We could try to issue a command and block, but reads might - * be available. It should be possible to break this wi...
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
2023 Jun 09
4
[libnbd PATCH v4 0/4] Saner reply header layout
This was v3 patch 2/22, reworked to address the confusion about how a structured reply header is read in two pieces before getting to the payload portion. I'm still working on rebasing the rest of my v3 series (patches 1, 3-22) from other comments given, but this seemed independent enough that it's worth posting now rather than holding it up for the rest of the series. Eric Blake (4):
2019 May 21
0
[libnbd PATCH 3/3] states: Allow in-flight read while writing next command
...5 ++++- lib/internal.h | 1 + 4 files changed, 47 insertions(+), 4 deletions(-) diff --git a/generator/generator b/generator/generator 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" ]; + }; + + S...
2019 May 19
0
[libnbd PATCH 4/4] states: Add NBD_OPT_EXPORT_NAME handling
...("OPT_EXPORT_NAME", newstyle_opt_export_name_state_machine); ] (* Fixed newstyle NBD_OPT_STARTTLS option. *) @@ -565,6 +566,44 @@ and newstyle_opt_go_state_machine = [ }; ] +(* Newstyle NBD_OPT_EXPORT_NAME option. *) +and newstyle_opt_export_name_state_machine = [ + State { + default_state with + name = "START"; + 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"...
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
2006 Jun 26
0
options_for_select-how to store cookie selected value ques.
#Controller cookies[:state] = state if state != nil and state.to_i != -1 conditions << ''stateid = ?'' cond_args << state cookies[:state] = state end if !cookies[:state].blank? @default_state = cookies[:state] else @default_state = "" end # view - html State: <td><%= select_tag "stateid", options_for_select(@state_names, :selected => @default_state) %></td> SOURCE OF HTML <...
2019 May 21
0
[libnbd PATCH 2/3] states: Split ISSUE_COMMAND.SEND_REQUEST
...rtions(+), 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"; comment = "Sending the write payload to...
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
2020 Jul 20
0
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
..._CONTEXT", newstyle_opt_set_meta_context_state_machine); Group ("OPT_GO", newstyle_opt_go_state_machine); @@ -341,6 +342,44 @@ and newstyle_opt_starttls_state_machine = [ }; ] +(* Fixed newstyle NBD_OPT_LIST option. *) +and newstyle_opt_list_state_machine = [ + State { + default_state with + name = "START"; + comment = "Start listing exports if in list mode."; + external_events = []; + }; + + State { + default_state with + name = "SEND"; + comment = "Send newstyle NBD_OPT_LIST to being listing exports"; + external_ev...
2020 Jul 20
2
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
Proposal for new APIs to list exports. The general shape of the API can probably best be seen from the examples/list-exports.c example. Rich.
2020 Mar 30
4
[libnbd PATCH 0/2] fix hangs against nbdkit 1.2
nbdkit 1.2 as a server waits for read() to see EOF, even after the client has sent NBD_CMD_DISC. That was fixed in mbdkit 1.4; and most modern NBD servers are smarter than this (they close() the write end of their traffic soon after NBD_CMD_DISC). But it's easy enough to revert nbdkit commit c70616f8 to get back to a server with the same behavior as the older nbdkit, at which point both
2023 Aug 03
1
[libnbd PATCH v4 20/25] generator: Actually request extended headers
...chine); Group ("OPT_GO", newstyle_opt_go_state_machine); @@ -441,6 +442,46 @@ and }; ] +(* Fixed newstyle NBD_OPT_EXTENDED_HEADERS option. + * Implementation: generator/states-newstyle-opt-extended-headers.c + *) +and newstyle_opt_extended_headers_state_machine = [ + State { + default_state with + name = "START"; + comment = "Try to negotiate newstyle NBD_OPT_EXTENDED_HEADERS"; + external_events = []; + }; + + State { + default_state with + name = "SEND"; + comment = "Send newstyle NBD_OPT_EXTENDED_HEADERS negotiation request&quot...
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
2006 Apr 22
5
ActiveRBAC 0.3.1 Released
...ails 1.1 (#114) * ActiveRBAC now runs with Rails 1.1 (tested with 1.1.2) (#118) * The files in app/model become stubs which simply import the ActiveRBAC mixins. This should make extending Models in your own code easier. (#112) * Moving the constants User::DEFAULT_PASSWORD_HASH_TYPES and User::DEFAULT_STATES to private class methods with lowercased names. (CHECK FOR DEPENDENCY IN YOUR CODE) * Renaming the "redirect_to" parameter/session variable nam of LoginController to "return_to" (#103) * Adding "all_static_permissions" method to User. (#109) * Adding Version ident...
2019 Jun 14
1
[libnbd PATCH] states: Validate error message size
...ertions(+), 1 deletion(-) diff --git a/generator/generator b/generator/generator index 3b0ca82..deb77f0 100755 --- a/generator/generator +++ b/generator/generator @@ -771,6 +771,13 @@ and structured_reply_state_machine = [ external_events = [ NotifyRead, "" ]; }; + State { + default_state with + name = "RECV_ERROR_TAIL"; + comment = "Receive a structured reply error tail"; + external_events = [ NotifyRead, "" ]; + }; + State { default_state with name = "RECV_OFFSET_DATA"; diff --git a/generator/states-reply-structured.c...
2020 Aug 14
0
[libnbd PATCH v2 06/13] api: Add nbd_opt_abort and nbd_aio_opt_abort
...p ("OPT_GO", newstyle_opt_go_state_machine); Group ("OPT_EXPORT_NAME", newstyle_opt_export_name_state_machine); + (* When NBD_OPT_GO fails, or when opt_mode is enabled, option parsing + * can be cleanly ended without moving through the %READY state. + *) + State { + default_state with + 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_eve...
2019 Jun 14
0
[libnbd PATCH 5/7] states: Factor out NBD_REP payload prep
...| 58 +++++++++++++++++++ 6 files changed, 86 insertions(+), 118 deletions(-) diff --git a/generator/generator b/generator/generator index e3dd10f..a289741 100755 --- a/generator/generator +++ b/generator/generator @@ -373,8 +373,8 @@ and newstyle_opt_starttls_state_machine = [ State { default_state with - name = "SKIP_REPLY_PAYLOAD"; - comment = "Skip newstyle NBD_OPT_STARTTLS reply payload"; + name = "RECV_REPLY_PAYLOAD"; + comment = "Receive any newstyle NBD_OPT_STARTTLS reply payload"; external_events = [ NotifyRead, "" ];...