search for: nbd_supports_uri

Displaying 20 results from an estimated 23 matches for "nbd_supports_uri".

2019 Jun 03
0
Re: [PATCH libnbd] api: nbd_get_version, nbd_supports_uri and nbd_get_package_name.
On 6/3/19 4:59 AM, Richard W.M. Jones wrote: > nbd_get_version returns the library version as a string. > > nbd_supports_uri returns whether or not the library was compiled with > NBD URI support (ie. with libxml2). > > nbd_get_package_name is fairly useless as it always returns the string > "libnbd", however it replaces a function that was written for the > Python bindings. > > These tak...
2019 Jun 03
3
[PATCH libnbd] api: nbd_get_version, nbd_supports_uri and nbd_get_package_name.
nbd_get_version returns the library version as a string. nbd_supports_uri returns whether or not the library was compiled with NBD URI support (ie. with libxml2). nbd_get_package_name is fairly useless as it always returns the string "libnbd", however it replaces a function that was written for the Python bindings. These take a handle parameter but don't...
2019 Jun 05
1
[libnbd PATCH] api: Add nbd_supports_tls
This is slightly redundant with just trying nbd_set_tls(nbd, 2) then checking for failure; however, this function does not set errors and looks more similar to nbd_supports_uri. --- This is borderline enough that I figured I'd post it to check if we want it. generator/generator | 45 ++++++++++++++++++++++++++++++++++++++------- interop/interop.c | 4 ++++ lib/handle.c | 12 ++++++++++++ 3 files changed, 54 insertions(+), 7 deletions(-) diff --git a/gene...
2019 Aug 14
3
[libnbd PATCH 0/2] Drop generated file from git
Rich recently patched things to generate one man page per function rather than libnbd-api.3 (nice), but in doing so got stumped by a problem with a fresh git clone (automake fails for any 'include' directive that does not already exist). I've figured out how to hack around it, but the hack requires GNU make. We already use GNU make constructs elsewhere (such as $(wildcard)), but
2019 Aug 14
0
[libnbd PATCH 2/2] docs: Drop docs/Makefile.inc from git
...necting \ - nbd_aio_is_ready \ - nbd_aio_is_processing \ - nbd_aio_is_dead \ - nbd_aio_is_closed \ - nbd_aio_command_completed \ - nbd_aio_peek_command_completed \ - nbd_aio_in_flight \ - nbd_connection_state \ - nbd_get_package_name \ - nbd_get_version \ - nbd_kill_command \ - nbd_supports_tls \ - nbd_supports_uri \ - $(NULL) diff --git a/generator/generator b/generator/generator index 257303f..9fe98f5 100755 --- a/generator/generator +++ b/generator/generator @@ -3733,9 +3733,10 @@ let generate_lib_api_c () = pr "\n"; List.iter print_wrapper handle_calls -(* We generate a fragment of Makefi...
2019 Aug 15
1
[PATCH libnbd] docs: Change docs/Makefile.inc back to a regular include, readd to git.
...ting \ + nbd_aio_is_ready \ + nbd_aio_is_processing \ + nbd_aio_is_dead \ + nbd_aio_is_closed \ + nbd_aio_command_completed \ + nbd_aio_peek_command_completed \ + nbd_aio_in_flight \ + nbd_connection_state \ + nbd_get_package_name \ + nbd_get_version \ + nbd_kill_subprocess \ + nbd_supports_tls \ + nbd_supports_uri \ + $(NULL) diff --git a/generator/generator b/generator/generator index 6cc06cc..437f432 100755 --- a/generator/generator +++ b/generator/generator @@ -3766,7 +3766,7 @@ let generate_lib_api_c () = let generate_docs_Makefile_inc () = generate_header HashStyle; - pr "api_built += \\\n&q...
2019 Nov 22
1
[nbdkit PATCH] nbd: Add vsock_cid= transport option
...L> True to share one server connection among all clients,\n" \ @@ -294,6 +324,7 @@ nbdplug_dump_plugin (void) printf ("libnbd_version=%s\n", nbd_get_version (nbd)); printf ("libnbd_tls=%d\n", nbd_supports_tls (nbd)); printf ("libnbd_uri=%d\n", nbd_supports_uri (nbd)); + printf ("libnbd_vsock=%d\n", USE_VSOCK); nbd_close (nbd); } @@ -484,6 +515,12 @@ nbdplug_open_handle (int readonly) r = nbd_connect_uri (h->nbd, uri); else if (sockname) r = nbd_connect_unix (h->nbd, sockname); + else if (raw_cid) +#if !USE_VSOCK + a...
2020 Jul 07
2
[nbdkit PATCH] nbd: Add vsock-cid= transport option
...ot;socket-fd=<FD> Socket file descriptor to connect to.\n" \ @@ -346,6 +376,7 @@ nbdplug_dump_plugin (void) printf ("libnbd_version=%s\n", nbd_get_version (nbd)); printf ("libnbd_tls=%d\n", nbd_supports_tls (nbd)); printf ("libnbd_uri=%d\n", nbd_supports_uri (nbd)); + printf ("libnbd_vsock=%d\n", USE_VSOCK); nbd_close (nbd); } @@ -545,6 +576,12 @@ nbdplug_open_handle (int readonly) r = nbd_connect_unix (h->nbd, sockname); else if (hostname) r = nbd_connect_tcp (h->nbd, hostname, port); + else if (raw_cid) +#if !USE_V...
2019 Aug 10
0
[PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
...lags) ]; + ret = RErr; permitted_states = [ Created ]; shortdesc = "connect to NBD URI"; longdesc = "\ @@ -1238,7 +1249,37 @@ the connection has been made. This call will fail if libnbd was not compiled with libxml2; you can test whether this is the case with C<nbd_supports_uri>. Support for URIs that require TLS will fail if libnbd was not compiled with -gnutls; you can test whether this is the case with C<nbd_supports_tls>."; +gnutls; you can test whether this is the case with C<nbd_supports_tls>. + +The C<allow> parameter lets you choose whi...
2020 Jul 07
0
Re: [nbdkit PATCH] nbd: Add vsock-cid= transport option
...gt; Socket file descriptor to connect to.\n" \ > @@ -346,6 +376,7 @@ nbdplug_dump_plugin (void) > printf ("libnbd_version=%s\n", nbd_get_version (nbd)); > printf ("libnbd_tls=%d\n", nbd_supports_tls (nbd)); > printf ("libnbd_uri=%d\n", nbd_supports_uri (nbd)); > + printf ("libnbd_vsock=%d\n", USE_VSOCK); > nbd_close (nbd); > } > > @@ -545,6 +576,12 @@ nbdplug_open_handle (int readonly) > r = nbd_connect_unix (h->nbd, sockname); > else if (hostname) > r = nbd_connect_tcp (h->nbd, hostname,...
2020 Aug 28
0
[nbdkit PATCH 3/3] nbd: Implement .list_exports
...st-nbd-tls.sh \ diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c index 7389b6d9..c2d2d166 100644 --- a/plugins/nbd/nbd.c +++ b/plugins/nbd/nbd.c @@ -407,6 +407,11 @@ nbdplug_dump_plugin (void) printf ("libnbd_tls=%d\n", nbd_supports_tls (nbd)); printf ("libnbd_uri=%d\n", nbd_supports_uri (nbd)); printf ("libnbd_vsock=%d\n", USE_VSOCK); +#if LIBNBD_HAVE_NBD_OPT_LIST + printf ("libnbd_dynamic_list=1\n"); +#else + printf ("libnbd_dynamic_list=0\n"); +#endif nbd_close (nbd); } @@ -685,6 +690,53 @@ nbdplug_open_handle (int readonly, const char *cl...
2019 Jun 08
0
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
...functions must take a lock. The only known exception is - * for a function which {b only} reads from the atomic [h->state] - * field and does nothing else with the handle. + (* Most functions must take a lock. The only known exceptions are: + * - functions which return a constant (eg. [nbd_supports_uri]) + * - functions which {b only} read from the atomic + * [get_public_state] and do nothing else with the handle. *) is_locked : bool; (* Most functions can call set_error. For functions which are @@ -2449,11 +2450,11 @@ let generate_lib_states_c () = pr " enum state n...
2019 Aug 10
2
Re: [PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
...permitted_states = [ Created ]; > shortdesc = "connect to NBD URI"; > longdesc = "\ > @@ -1238,7 +1249,37 @@ the connection has been made. > This call will fail if libnbd was not compiled with libxml2; you can > test whether this is the case with C<nbd_supports_uri>. Support for > URIs that require TLS will fail if libnbd was not compiled with > -gnutls; you can test whether this is the case with C<nbd_supports_tls>."; > +gnutls; you can test whether this is the case with C<nbd_supports_tls>. > + > +The C<allow> para...
2019 Jun 05
1
[PATCH libnbd v2] lib: Atomically update h->state when leaving the locked region.
Split h->state into: - h->public_state = the state on entry to the locked region This is also the atomicly, publicly visible state. - h->state = the real current state of the handle When we leave the locked region we update h->public_state with h->state, so that from outside the lock the handle appears to move atomically from its previous state to the final state without
2020 Jun 30
5
[PATCH nbdkit 0/5 NOT WORKING] nbd: Implement command= and socket-fd= parameters.
The first four patches are fairly routine clean up and can be reviewed/applied on their own. The fifth patch is problematic as described below. At the moment if you want to proxy through to qemu-nbd (eg. for handling qcow2 files) it's rather complicated and you end up having to manage the sockets and clean up yourself. However the library we use for the proxying supports a perfectly good
2019 Jun 08
4
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-June/thread.html#00055 v2 was here: https://www.redhat.com/archives/libguestfs/2019-June/thread.html#00067 v3: - Fix atomicly -> atomically in commit message. - Fix a comment. - Fix TOCTTOU: There is now an inline function generated called <name>_is_permitted_state, and this is called twice, first outside the
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator. Enum maps to enumerated types (like enum in C). The only current use for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural equivalents in other programming languages). Flags maps to any uint32_t bitmask. It is basically a non-optional, generalized
2020 Jul 01
15
[PATCH nbdkit 0/9] nbd: Implement command= and socket-fd= parameters.
I fixed the deadlock - turned out to be an actual bug in the nbd plugin (see patch 8). I changed the command syntax so it's now: nbdkit nbd command=qemu arg=-f arg=qcow2 arg=/path/to/disk.qcow2 Nir wrote: 18:08 < nsoffer> rwmjones: regarding the nbd proxy patches, did you have specific flow that help us? 18:08 < nsoffer> rwmjones: or this is just a way to support qcow2 in the
2020 Aug 28
4
[nbdkit PATCH 0/3] .list_exports in nbd plugin
Another series on top of my exportname filter, marking off another todo bullet point. With this, you can now use the NBD plugin as a transparent passthrough of all export names served by the remote server in both directions (list advertisement server to client, and export name from client to server). Eric Blake (3): nbd: Implement .default_export, .export_description nbd: Add
2019 Jun 12
8
[nbdkit PATCH v3 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.4-1 is now available in Fedora 29/30 updates testing. Diffs since v2 - rebase to master, bump from libnbd 0.1.2 to 0.1.3+, add tests to TLS usage which flushed out the need to turn relative pathnames into absolute, doc tweaks Now that the testsuite covers TLS and libnbd has been fixed to provide the things I found lacking when developing v2, I'm leaning towards pushing this on