search for: nbdplug_unload

Displaying 13 results from an estimated 13 matches for "nbdplug_unload".

2020 Jul 01
0
[PATCH nbdkit 8/9] nbd: Fix shared=true so it creates background thread after fork.
...ns/nbd/nbd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c index 05f78777..91ed91e0 100644 --- a/plugins/nbd/nbd.c +++ b/plugins/nbd/nbd.c @@ -109,7 +109,7 @@ static void nbdplug_close_handle (struct handle *h); static void nbdplug_unload (void) { - if (shared) + if (shared && shared_handle) nbdplug_close_handle (shared_handle); free (sockname); free (tls_certificates); @@ -266,8 +266,15 @@ nbdplug_config_complete (void) } nbd_close (nbd); } + return 0; +} - /* Create the shared connection. */...
2019 Nov 22
1
[nbdkit PATCH] nbd: Add vsock_cid= transport option
...ket */ static const char *hostname; + +/* Valid with TCP or VSOCK */ static const char *port; +/* Connect to server via AF_VSOCK socket */ +static const char *raw_cid; +static uint32_t cid; +static uint32_t vport; + /* Connect to server via URI */ static const char *uri; @@ -116,10 +130,10 @@ nbdplug_unload (void) } /* Called for each key=value passed on the command line. This plugin - * accepts socket=<sockname>, hostname=<hostname>/port=<port>, or - * [uri=]<uri> (exactly one connection required), and optional - * parameters export=<name>, retry=<n>, shared=&l...
2020 Jul 07
2
[nbdkit PATCH] nbd: Add vsock-cid= transport option
...onst char *hostname; + +/* Valid with TCP or VSOCK */ static const char *port; +/* Connect to server via AF_VSOCK socket */ +static const char *raw_cid; +static uint32_t cid; +static uint32_t vport; + /* Connect to a command. */ static string_vector command = empty_vector; @@ -126,11 +140,8 @@ nbdplug_unload (void) free (command.ptr); /* the strings are statically allocated */ } -/* Called for each key=value passed on the command line. This plugin - * accepts socket=<sockname>, hostname=<hostname>/port=<port>, or - * [uri=]<uri> (exactly one connection required), and optio...
2019 Jun 18
0
[nbdkit PATCH] Experiment: nbd: Use ppoll() instead of pipe-to-self
...le *nbdplug_open_handle (int readonly); static void nbdplug_close_handle (struct handle *h); +/* Original signal mask, with SIGUSR1 unblocked */ +static sigset_t origmask; + +/* No-op signal handler for interrupting ppoll on SIGUSR1 */ +static void +nbdplug_sigusr1 (int sig) +{ +} + static void nbdplug_unload (void) { @@ -195,10 +204,30 @@ nbdplug_config (const char *key, const char *value) return 0; } -/* Check the user passed exactly one socket description. */ +/* Finalize the configuration. */ static int nbdplug_config_complete (void) { + struct sigaction act = { + .sa_handler = nbdplug_...
2020 Jul 07
0
Re: [nbdkit PATCH] nbd: Add vsock-cid= transport option
...gt; static const char *port; > > +/* Connect to server via AF_VSOCK socket */ > +static const char *raw_cid; > +static uint32_t cid; > +static uint32_t vport; > + > /* Connect to a command. */ > static string_vector command = empty_vector; > > @@ -126,11 +140,8 @@ nbdplug_unload (void) > free (command.ptr); /* the strings are statically allocated */ > } > > -/* Called for each key=value passed on the command line. This plugin > - * accepts socket=<sockname>, hostname=<hostname>/port=<port>, or > - * [uri=]<uri> (exactly one c...
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
2019 Jun 02
5
[nbdkit PATCH v2 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.2-1 is now available in Fedora 29/30 updates-testing, although it was not compiled against libxml2 so it lacks uri support (I ended up testing patch 4 with a self-built libnbd). Diffs since v1 - rebase to master, bump from libnbd 0.1 to 0.1.2, add URI support, better timing results Still not done - patch 5 needs associated tests Eric Blake (5): nbd: Check for libnbd nbd:
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
2019 May 30
5
[nbdkit PATCH 0/4] Play with libnbd for nbdkit-add
Patch 1 played with an early draft of Rich's Fedora 30 libnbd package: https://bugzilla.redhat.com/show_bug.cgi?id=1713767#c17 Note that comment 21 provides a newer package 0.1.1-1 with a different API; and that libnbd has more unreleased API changes in the pipeline (whether that will be called 0.2 or 0.1.2); so we'll have to tweak things based on what is actually available in distros.
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
...t */ @@ -95,9 +87,6 @@ static char *sockname; static const char *hostname; static const char *port; -/* Human-readable server description */ -static char *servname; - /* Name of export on remote server, default '', ignored for oldstyle */ static const char *export; @@ -117,7 +106,6 @@ nbdplug_unload (void) if (shared) nbdplug_close_handle (shared_handle); free (sockname); - free (servname); } /* Called for each key=value passed on the command line. This plugin @@ -170,8 +158,6 @@ nbdplug_config (const char *key, const char *value) static int nbdplug_config_complete (void) {...
2019 Sep 23
2
[PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
.../plugins/nbd/nbd.c +++ b/plugins/nbd/nbd.c @@ -89,7 +89,7 @@ static const char *uri; static const char *export; /* Number of retries */ -static unsigned long retry; +static unsigned retry; /* True to share single server connection among all clients */ static bool shared; @@ -124,7 +124,6 @@ nbdplug_unload (void) static int nbdplug_config (const char *key, const char *value) { - char *end; int r; if (strcmp (key, "socket") == 0) { @@ -143,12 +142,8 @@ nbdplug_config (const char *key, const char *value) else if (strcmp (key, "export") == 0) export = value; el...
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
On Mon, Sep 23, 2019 at 12:05:11PM -0500, Eric Blake wrote: > > + int nbdkit_parse_long (const char *what, const char *str, long *r); > > + int nbdkit_parse_unsigned_long (const char *what, > > + const char *str, unsigned long *r); > > Do we really want to encourage the use of parse_long and > parse_unsigned_long? Those differ between
2019 Sep 21
2
[PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
.../plugins/nbd/nbd.c +++ b/plugins/nbd/nbd.c @@ -89,7 +89,7 @@ static const char *uri; static const char *export; /* Number of retries */ -static unsigned long retry; +static unsigned retry; /* True to share single server connection among all clients */ static bool shared; @@ -124,7 +124,6 @@ nbdplug_unload (void) static int nbdplug_config (const char *key, const char *value) { - char *end; int r; if (strcmp (key, "socket") == 0) { @@ -143,12 +142,8 @@ nbdplug_config (const char *key, const char *value) else if (strcmp (key, "export") == 0) export = value; el...