similar to: [libnbd PATCH] opt-go: Better decoding of known errors

Displaying 20 results from an estimated 400 matches similar to: "[libnbd PATCH] opt-go: Better decoding of known errors"

2019 Sep 24
0
[PATCH nbdkit 3/4] common/protocol: Update nbd-protocol.h so it matches libnbd’s copy.
Diff against libnbd’s copy of this file, and change this one until it matches. --- common/protocol/nbd-protocol.h | 76 +++++++++++++++++----------- server/protocol-handshake-newstyle.c | 26 +++++----- server/protocol-handshake-oldstyle.c | 4 +- server/protocol.c | 25 ++++----- tests/test-layers.c | 14 ++--- 5 files changed, 81 insertions(+), 64
2018 Aug 06
0
[PATCH nbdkit v2] protocol: Implement NBD_OPT_GO.
--- src/connections.c | 233 +++++++++++++++++++++++++++++++++++++--------- src/protocol.h | 27 ++++-- 2 files changed, 209 insertions(+), 51 deletions(-) diff --git a/src/connections.c b/src/connections.c index ba6e91d..4e9b191 100644 --- a/src/connections.c +++ b/src/connections.c @@ -75,7 +75,9 @@ struct connection { void **handles; size_t nr_handles; + uint32_t cflags;
2019 Sep 24
0
[PATCH nbdkit 2/4] common/protocol: Remove protostrings.sed, use bash+sed instead.
Use a simple bash script to generate the protostrings.c functions. Remove the extern decls from the nbd-protocol.h file which were used previously in the generation of this file. They have been moved to a new internal header called "protostrings.h". --- common/protocol/Makefile.am | 8 ++- ...tostrings.sed => generate-protostrings.sh} | 56 +++++++++++--------
2019 Sep 24
11
[PATCH nbdkit 0/4] common/protocol: Unify public <nbd-protocol.h>
We should have only one NBD protocol file. Let's make nbdkit's version the canonical one, and use it in libnbd. Rich.
2019 Jun 14
0
[libnbd PATCH 7/7] states: Capture NBD_REP_ERR message
Similar to the earlier patch for structured reply errors, it's worth logging (at least through debug) any error messages that the server sends alongside NBD_REP_ERR. And given our earlier changes, it doesn't really impact the size of struct nbd_handle. --- generator/states-newstyle-opt-go.c | 5 ++-- .../states-newstyle-opt-set-meta-context.c | 6 +++-
2018 Dec 06
0
[PATCH nbdkit 3/5] protocol: Generate map functions from NBD protocol flags to printable strings.
This generates small functions which map from various integer NBD protocol flags to the string equivalent. eg: name_of_nbd_cmd (NBD_CMD_READ) ---> "NBD_CMD_READ" This commit uses some hairy sed scripting to ensure that we don't add any more dependencies to nbdkit. --- src/protocol.h | 9 +++++++ .gitignore | 1 + src/Makefile.am | 17
2019 May 17
1
[nbdkit PATCH] truncate: Detect large image overflow with round-up
It is possible for the round-up parameter to cause our desired size to exceed 2**63-1. But this error message is cryptic: $ ./nbdkit -f --filter=truncate pattern $(((1<<63)-1)) round-up=1m & $ qemu-nbd --list nbdkit: pattern[1]: error: .get_size function returned invalid value (-9223372036854775808) qemu-nbd: Failed to read initial magic: Unexpected end-of-file before all bytes were
2019 Sep 25
0
[nbdkit PATCH 2/2] common/protocol: Declare additional constants
We aren't using them yet, but as we are now publishing this file, it's worth letting other clients have a chance to use named bits reserved by the protocol. This does not expose anything related to resize, as that is still experimental. Signed-off-by: Eric Blake <eblake@redhat.com> --- common/protocol/nbd-protocol.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
2019 Sep 25
0
[libnbd PATCH] lib: Synchronize nbd-protocol.h with nbdkit, again
Updated in https://github.com/libguestfs/nbdkit/commit/XXX Requires tweaks to our handling of nbd magic. --- Will update with a real URL, if we like it. lib/nbd-protocol.h | 35 ++++++++++++++++------------------- generator/states-magic.c | 2 +- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/lib/nbd-protocol.h b/lib/nbd-protocol.h index fe4d451..bdd1ef2 100644 ---
2019 Mar 18
0
[PATCH nbdkit 2/2] server: Split out NBD protocol code from connections code.
The code handling the NBD protocol was located in the same file as the code handling connections, for not really any reason except historical. This is quite a large code movement which splits out the protocol code into four new files: server/protocol-handshake.c initial handshake server/protocol-handshake-newstyle.c " " (newstyle)
2019 Mar 20
0
[PATCH nbdkit 3/8] server: Implement Block Status requests to read allocation status.
This commit implements the core NBD protocol for the "base:allocation" Block Status replies. --- server/internal.h | 7 ++ server/protocol.h | 15 +++ server/protocol-handshake-newstyle.c | 81 ++++++++++++++- server/protocol.c | 141 ++++++++++++++++++++++++--- 4 files changed, 229 insertions(+), 15 deletions(-) diff --git
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
Since commit 86fdb48c6a5362d66865493d9d2172166f99722e we have stored the connection object in thread-local storage. In this very large, but mostly mechanical change we stop passing the connection pointer around everywhere, and instead use the value stored in thread-local storage. This assumes a 1-1 mapping between the connection and the current thread which is true in *most* places.
2022 Nov 14
2
[PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS
Add a new negotiation feature where the client and server agree to use larger packet headers on every packet sent during transmission phase. This has two purposes: first, it makes it possible to perform operations like trim, write zeroes, and block status on more than 2^32 bytes in a single command. For NBD_CMD_READ, replies are still implicitly capped by the maximum block payload limits
2019 Mar 19
0
[PATCH nbdkit 3/9] server: Implement Block Status requests to read allocation status.
This commit implements the core NBD protocol for the "base:allocation" Block Status replies. --- server/internal.h | 7 + server/protocol.h | 17 +- server/protocol-handshake-newstyle.c | 79 ++++++++- server/protocol.c | 248 +++++++++++++++++++++++++-- 4 files changed, 335 insertions(+), 16 deletions(-) diff --git
2020 Sep 29
1
[nbdkit PATCH] server: Adjust limit on max NBD_OPT_* from client
Up to nbdkit 1.22, we never advertised large export lists, so a client had no real reason to give more than 32 NBD_OPT_ commands before finally selecting an export or quitting, and we were justified in dropping indecisive chatty clients as being a waste of server resources. But now that we support .list_exports, it is reasonable for a client (such as 'qemu-nbd --list' or 'nbdinfo
2019 Sep 28
0
[nbdkit PATCH v2 7/7] server: Better newstyle .open failure handling
If a plugin's .open or .get_size or .can_write fails, right now that is fatal to the connection. When nbdkit was first implemented, this made sense (there was no way to report errors to oldstyle or NBD_OPT_EXPORT_NAME). But now that newstyle is around, it's rather abrupt to hang up on the client, and better is to return an error to NBD_OPT_GO, and let the client choose what to do (most
2019 Sep 17
1
Re: [PATCH nbdkit 1/4] Add reflection plugin.
On 9/17/19 2:42 AM, Richard W.M. Jones wrote: > On Mon, Sep 16, 2019 at 10:33:18AM -0500, Eric Blake wrote: >> Is it worth noting that the NBD protocol imposes a 4k limit on the >> export name, which would limit things to about a 3k disk image when >> using base64? (It looks like nbdkit does not currently enforce that >> limit -- maybe it should, but as a separate patch
2019 Apr 23
12
[nbdkit PATCH 0/7] Implement structured replies in nbd plugin
I'm hoping to implement .extents for the nbd plugin; this is a prerequisite. I'm not sure about patch 3 - if we like it, I'll squash it to 2, if we don't, I think we are okay just dropping it. I'm also wondering if we have to worry about malicious plugins that don't populate the entire .pread buffer in an effort to get nbdkit to expose portions of the heap; my patch 7 loses
2023 Mar 03
1
[PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS
On Wed, Feb 22, 2023 at 11:49:18AM +0200, Wouter Verhelst wrote: > On Mon, Nov 14, 2022 at 04:46:52PM -0600, Eric Blake wrote: > [...] > > @@ -1370,9 +1475,10 @@ of the newstyle negotiation. > > Return a list of `NBD_REP_META_CONTEXT` replies, one per context, > > followed by an `NBD_REP_ACK` or an error. > > > > - This option SHOULD NOT be
2019 Jun 14
1
Re: [libnbd PATCH 7/7] states: Capture NBD_REP_ERR message
On 6/14/19 4:54 PM, Eric Blake wrote: > Similar to the earlier patch for structured reply errors, it's worth > logging (at least through debug) any error messages that the server > sends alongside NBD_REP_ERR. And given our earlier changes, it > doesn't really impact the size of struct nbd_handle. > --- > +++ b/generator/states-newstyle.c > @@ -77,6 +77,35 @@