search for: strict_flag

Displaying 9 results from an estimated 9 matches for "strict_flag".

Did you mean: strict_flags
2020 Sep 17
0
Re: [libnbd PATCH v2 4/5] api: Add STRICT_FLAGS to set_strict_mode
On 9/17/20 8:32 AM, Richard W.M. Jones wrote: > On Fri, Sep 11, 2020 at 04:49:55PM -0500, Eric Blake wrote: >> The next strict knob: allow the user to pass unknown flags across the >> wire (this is different than passing a known flag at the wrong time). >> >> It is interesting to note that NBD only permits 16 bits of flags, but >> we have a signature that takes
2020 Sep 11
0
[libnbd PATCH v2 4/5] api: Add STRICT_FLAGS to set_strict_mode
...g; + guard : string option; flags : (string * int) list } and permitted_state = @@ -165,6 +166,7 @@ let all_enums = [ tls_enum; block_size_enum ] (* Flags. See also Constants below. *) let cmd_flags = { flag_prefix = "CMD_FLAG"; + guard = Some "((h->strict & LIBNBD_STRICT_FLAGS) || flags > UINT16_MAX)"; flags = [ "FUA", 1 lsl 0; "NO_HOLE", 1 lsl 1; @@ -175,6 +177,7 @@ let cmd_flags = { } let handshake_flags = { flag_prefix = "HANDSHAKE_FLAG"; + guard = None; flags = [ "FIXED_NEWSTYLE", 1 l...
2020 Sep 17
2
Re: [libnbd PATCH v2 4/5] api: Add STRICT_FLAGS to set_strict_mode
...gs : (string * int) list > } > and permitted_state = > @@ -165,6 +166,7 @@ let all_enums = [ tls_enum; block_size_enum ] > (* Flags. See also Constants below. *) > let cmd_flags = { > flag_prefix = "CMD_FLAG"; > + guard = Some "((h->strict & LIBNBD_STRICT_FLAGS) || flags > UINT16_MAX)"; > flags = [ > "FUA", 1 lsl 0; > "NO_HOLE", 1 lsl 1; > @@ -175,6 +177,7 @@ let cmd_flags = { > } > let handshake_flags = { > flag_prefix = "HANDSHAKE_FLAG"; > + guard = None; > f...
2020 Sep 11
0
[libnbd PATCH v2 3/5] api: Add nbd_set_strict_mode
...ription = "\n This call does not block, because it returns data that is saved in the handle from the NBD protocol handshake." @@ -171,7 +178,13 @@ let handshake_flags = { flags = [ "FIXED_NEWSTYLE", 1 lsl 0; "NO_ZEROES", 1 lsl 1; - ] + ] +} +let strict_flags = { + flag_prefix = "STRICT"; + flags = [ + "COMMANDS", 1 lsl 0; + ] } let allow_transport_flags = { flag_prefix = "ALLOW_TRANSPORT"; @@ -187,8 +200,8 @@ let shutdown_flags = { "IMMEDIATE", 1 lsl 1; ] } -let all_flags = [ cmd_flags;...
2020 Sep 04
0
[libnbd PATCH 1/2] api: Add nbd_set_strict_mode
...’ is updated diff --git a/generator/API.ml b/generator/API.ml index 962b787..8811d3c 100644 --- a/generator/API.ml +++ b/generator/API.ml @@ -169,7 +169,13 @@ let handshake_flags = { flags = [ "FIXED_NEWSTYLE", 1 lsl 0; "NO_ZEROES", 1 lsl 1; - ] + ] +} +let strict_flags = { + flag_prefix = "STRICT"; + flags = [ + "COMMANDS", 1 lsl 0; + ] } let allow_transport_flags = { flag_prefix = "ALLOW_TRANSPORT"; @@ -179,7 +185,8 @@ let allow_transport_flags = { "VSOCK", 1 lsl 2; ] } -let all_flags = [ cmd_fla...
2020 Sep 04
4
[RFC libnbd PATCH 0/2] Add knobs for client- vs. server-side validation
We have been inconsistent on how much we reject client-side without even consulting the server, vs. how much we depend on the server to detect failure (even if our request can be deemed undefined per NBD protocol). I'd like to change it so that by default, we reject as much as we can client-side for less traffic, but where the user can also change things on the fly for server-side integration
2020 Sep 04
0
[libnbd PATCH 2/2] api: Add STRICT_BOUNDS to nbd_set_strict_mode
...| 87 +++++++++++++++++++++++++++++++++++++++++++----- tests/errors.c | 20 ++++++++++- 4 files changed, 105 insertions(+), 11 deletions(-) diff --git a/generator/API.ml b/generator/API.ml index 8811d3c..10d145c 100644 --- a/generator/API.ml +++ b/generator/API.ml @@ -175,6 +175,7 @@ let strict_flags = { flag_prefix = "STRICT"; flags = [ "COMMANDS", 1 lsl 0; + "BOUNDS", 1 lsl 1; ] } let allow_transport_flags = { @@ -728,6 +729,12 @@ set of advertised server flags (for example, attempting a write on a read-only server). If clear,...
2020 Sep 11
10
[libnbd PATCH v2 0/5] Add knobs for client- vs. server-side validation
In v2: - now based on my proposal to add LIBNBD_SHUTDOWN_IMMEDIATE - four flags instead of two: STRICT_FLAGS is new (patch 4), and STRICT_BOUNDS is separate from STRICT_ZERO_SIZE (patch 5) - various refactorings for more shared code and less duplication Eric Blake (5): api: Add xxx_MASK constant for each Flags type generator: Refactor filtering of accepted OFlags api: Add nbd_set_strict_mode api...
2020 Sep 11
0
[libnbd PATCH v2 5/5] api: Add STRICT_BOUNDS/ZERO_SIZE to nbd_set_strict_mode
...void *data, + struct command_cb *cb); /* socket.c */ struct socket *nbd_internal_socket_create (int fd); diff --git a/generator/API.ml b/generator/API.ml index 4cd425b..d3b1d1b 100644 --- a/generator/API.ml +++ b/generator/API.ml @@ -189,6 +189,8 @@ let strict_flags = { flags = [ "COMMANDS", 1 lsl 0; "FLAGS", 1 lsl 1; + "BOUNDS", 1 lsl 2; + "ZERO_SIZE", 1 lsl 3; ] } let allow_transport_flags = { @@ -772,6 +774,18 @@ Note that the NBD protocol only supports 16 bits of c...