similar to: [PATCH nbdkit] Change the default protocol to newstyle.

Displaying 20 results from an estimated 2000 matches similar to: "[PATCH nbdkit] Change the default protocol to newstyle."

2019 Sep 12
0
[nbdkit PATCH 2/2] server: Add --mask-handshake option for integration testing
Similar to --no-sr, it can be handy for testing a client implementation to have a server that can easily be forced into older behaviors, without having to recompile a one-off hack into a server or dig up an older server binary that lacked a newer feature. To see the patch in action, try things like: $ ./nbdkit -U - -fv --mask-handshake=0 null \ --run 'qemu-nbd --list -k $unixsocket'
2019 Aug 20
2
[nbdkit PATCH v2] main: Add option to disable SR advertisement
When we added support for .extents, we had nbdkit unconditionally support structured replies if the client requests them, and the plugin's .can_extents has no impact on what the server advertises. However, while the plugin API doesn't care whether the client requested SR, there are still integration situations where not advertising SR can be useful (such as comparison on what a client does
2020 Jul 21
3
[PATCH nbdkit] server: Deprecate the -e/--exportname parameter.
This parameter provided a name for the "default export" -- ie. the one and only export returned to the client by NBD_OPT_LIST. But nbdkit traditionally didn't care what export name the client requested. Since 1.16 plugins have been able to serve different content per export name (and return errors for unknown exports), but the -e option didn't reflect that and only created
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 Jan 01
2
[PATCH nbdkit] server: Use bool for types which are really booleans.
For mainly historical reasons we tended to use int to store boolean values. However using bool is probably safer in some corner cases (eg. ?v == true? can fail badly if v is an int, but works for bool). bool was added in C99 so let's use it. --- server/internal.h | 16 +++++------ server/connections.c | 28 +++++++++--------- server/crypto.c | 4 +-- server/main.c | 67
2019 Sep 10
1
Re: [PATCH nbdkit] server: Add nbdkit_export_name() to allow export name to be read.
On 9/10/19 6:20 AM, Richard W.M. Jones wrote: > This allows plugins (or filters) to read the export name which was > passed to the server from the client. > > UNFINISHED: > > - Needs tests > --- > TODO | 8 ++++++ > docs/nbdkit-plugin.pod | 39 ++++++++++++++++++++++++++++ > server/connections.c | 1 +
2020 Jul 21
4
[PATCH nbdkit] server: Pass the export name through filter .open calls.
To allow filters to modify the export name as it passes through the layers this commit makes several changes: The filter .open callback now takes an extra parameter, the export name. This is always non-NULL (for oldstyle it is ""). This string has a short lifetime and filters that need to hang on to it must take a copy. The filter must pass the exportname parameter down to the next
2019 Sep 10
0
[PATCH nbdkit] server: Add nbdkit_export_name() to allow export name to be read.
This allows plugins (or filters) to read the export name which was passed to the server from the client. UNFINISHED: - Needs tests --- TODO | 8 ++++++ docs/nbdkit-plugin.pod | 39 ++++++++++++++++++++++++++++ server/connections.c | 1 + server/internal.h | 1 + server/protocol-handshake-newstyle.c | 30
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)
2018 Apr 05
2
[nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
CentOS 6 has libguestfs-devel 1.20.11, which predates the support in guestfs_add_drive_opts() for requesting an nbd drive instead of a local file. The guestfs plugin can still be built, so no configure changes are needed; but skip the tests that fail to compile so that 'make check' can at least complete. Signed-off-by: Eric Blake <eblake@redhat.com> --- Even with this patch,
2018 Jun 28
1
[nbdkit PATCH] main: More idiomatic use of getopt_long
Prefer named constants over magic numbers in the 'struct option' list, and expand the list of enums for long-only options so that the call to getopt_long() can switch directly to every option, rather than needing a lengthy if/else chain that grows for every new long option. Patch best viewed with whitespace changes ignored. Signed-off-by: Eric Blake <eblake@redhat.com> ---
2020 Jul 22
0
Re: [PATCH nbdkit] server: Pass the export name through filter .open calls.
On 7/21/20 3:47 PM, Richard W.M. Jones wrote: > To allow filters to modify the export name as it passes through the > layers this commit makes several changes: > > The filter .open callback now takes an extra parameter, the export > name. This is always non-NULL (for oldstyle it is ""). This string > has a short lifetime and filters that need to hang on to it must
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
2020 Jul 23
0
Re: [nbdkit PATCH] server: Reinstate limited use of -e/-exportname.
On Wed, Jul 22, 2020 at 12:58:07PM -0500, Eric Blake wrote: [...] This is fine, but there is a minor thing: > docs/nbdkit-protocol.pod | 2 +- In the original patch I removed this hunk from nbdkit-protocol.pod: @@ -5,7 +5,7 @@ nbdkit - which parts of the NBD protocol nbdkit supports =head1 SYNOPSIS nbdkit [-n|--newstyle] [--mask-handshake MASK] [--no-sr] [-o|--oldstyle] -
2019 Sep 17
0
[PATCH libnbd 2/2] api: New API for reading NBD protocol.
This commit adds a new API which can be used from the connected to state to read back which NBD protocol (eg. oldstyle, newstyle-fixed) we are using. It was helpful to add a new state in newstyle negotiation (%NEWSTYLE.FINISHED) so we can route all successful option negotiations through a single path before moving to the %READY state, allowing us to set h->protocol in one place. ---
2017 Nov 17
0
[nbdkit PATCH 6/6] Add --threads option for supporting true parallel requests
It's finally time to implement one of the TODO items: we want to support a thread pool of parallel readers from the client, in order to allow multiple in-flight operations with potential out-of-order completion. We also need at least one plugin that supports parallel processing for testing the option; the file plugin fits the bill. Add and document a new command line option, -t/--threads=N,
2019 Sep 16
1
[libnbd PATCH] states: Avoid magic number for h->tls
When we moved to an enum instead of raw int for nbd_set_tls(), we should have also updated our code to prefer the enum values. While at it, improve the grammar of error messages (confusing since 632196ec, and copy-and-pasted into more locations since then). Fixes: 4488cf2a Thanks: Rich Jones --- Rich noticed this while reviewing the patch for today's CVE fix. It's not a show-stopper if
2019 May 23
0
[PATCH libnbd 1/3] states: Factor out common code for setting export size and eflags.
Simple refactoring. --- generator/states-newstyle-opt-export-name.c | 12 +++++------ generator/states-newstyle-opt-go.c | 13 ++++++------ generator/states-oldstyle.c | 10 +++------- lib/flags.c | 22 +++++++++++++++++++++ lib/internal.h | 5 +++++ 5 files changed, 42 insertions(+), 20 deletions(-) diff
2019 Sep 19
0
[nbdkit PATCH 4/4] server: Fix OPT_GO on different export than SET_META_CONTEXT
The NBD spec says that if a client requests SET_META_CONTEXT for exportA, but later requests NBD_OPT_GO/EXPORT_NAME for exportB, then the server should reject NBD_CMD_BLOCK_STATUS requests (that is, the context returned for exportA need not apply to exportB). When we originally added base:allocation, our argument was that we always ignore export names, so it was easier to just treat any two
2019 Sep 28
11
[nbdkit PATCH v2 0/7] Spec compliance patches
Since the v1 series (0/4, at [1]), I've applied patches 1 and 2, rewritten patch 3 [Forbid NUL in export and context names] into patch 4 here, patch 4 there turned into patch 6 here, and everything else here is new. [1]https://www.redhat.com/archives/libguestfs/2019-September/msg00180.html I don't know if there is a handy reusable function for checking whether a string contains valid