Displaying 20 results from an estimated 26 matches for "set_up_signals".
2019 Nov 04
3
[PATCH nbdkit v2 0/2] Implement fuzzing using Clang's libFuzzer.
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-November/msg00003.html
This version depends on:
https://www.redhat.com/archives/libguestfs/2019-November/msg00004.html
and this series:
https://www.redhat.com/archives/libguestfs/2019-November/msg00009.html
The delta has been reduced slightly because of changes made possible
by cleaning up and fixing the quit path in nbdkit. It's
2020 Feb 22
2
Re: Plans for nbdkit 1.18 release?
Eric:
Did you want to take this one any further? It might be one that we
save for > 1.18:
https://www.redhat.com/archives/libguestfs/2020-February/thread.html#00206
Another thing I've been thinking about for some time is splitting
.config_complete into .config_complete + .get_ready (new name TBD).
At the moment .config_complete is both the place where we finish
processing config, and
2020 Feb 22
1
Re: Plans for nbdkit 1.18 release?
...git a/server/main.c b/server/main.c
index 8aa8b497..3bc59781 100644
--- a/server/main.c
+++ b/server/main.c
@@ -671,10 +671,25 @@ main (int argc, char *argv[])
/* Select the correct thread model based on config. */
lock_init_thread_model ();
- set_up_quit_pipe ();
-#if !ENABLE_LIBFUZZER
- set_up_signals ();
-#endif
+ /* If the user has mixed up -p/--run/-s/-U/--vsock options, then
+ * give an error.
+ *
+ * XXX Actually the server could easily be extended to handle both
+ * TCP/IP and Unix sockets, or even multiple TCP/IP ports.
+ */
+ if ((port && unixsocket) ||
+ (port &...
2020 Mar 26
0
[PATCH nbdkit 5/9 patch split 5/5] server: Indirect slow path, non-self-contained functions through the server.
...ex a3f4d1f1..9ef0b066 100644
--- a/server/internal.h
+++ b/server/internal.h
@@ -153,6 +153,7 @@ extern int quit_fd;
extern void set_up_quit_pipe (void);
extern void close_quit_pipe (void);
extern void handle_quit (int sig);
+extern void do_nbdkit_shutdown (void);
/* signals.c */
extern void set_up_signals (void);
@@ -473,6 +474,7 @@ extern int backend_cache (struct backend *b,
extern struct backend *plugin_register (size_t index, const char *filename,
void *dl, struct nbdkit_plugin *(*plugin_init) (void))
__attribute__((__nonnull__ (2, 3, 4)));
+extern vo...
2017 Jan 31
0
[PATCH nbdkit] Add support for socket activation.
...optarg, "-") == 0)
unixsocket = make_random_fifo ();
else
@@ -454,6 +486,7 @@ start_serving (void)
{
int *socks;
size_t nr_socks;
+ size_t i;
/* If the user has mixed up -p/-U/-s options, then give an error.
*
@@ -470,6 +503,27 @@ start_serving (void)
set_up_signals ();
+ /* Socket activation -- we are handling connections on pre-opened
+ * file descriptors [FIRST_SOCKET_ACTIVATION_FD ..
+ * FIRST_SOCKET_ACTIVATION_FD+nr_socks-1].
+ */
+ if (socket_activation) {
+ nr_socks = socket_activation;
+ debug ("using socket activation, nr_socks =...
2020 Aug 15
3
[PATCH EXPERIMENTAL nbdkit 0/2] Port to Windows using mingw.
The patches following do indeed allow you to compile nbdkit.exe, but
it does not actually work yet. I'm posting this experimental series
more as a work in progress and to get feedback.
Note this does not require Windows itself to build or test. You can
cross-compile it using mingw64-* packages on Fedora or Debian, and
test it [spoiler alert: it fails] using Wine.
Rich.
2019 Nov 02
2
[PATCH nbdkit 0/2] Implement fuzzing using Clang's libFuzzer.
libFuzzer is Clang's fuzzer, and alternative to using AFL:
https://llvm.org/docs/LibFuzzer.html
I implemented an alternative method of fuzzing for libnbd earlier
today and it's pretty simple:
https://github.com/libguestfs/libnbd/commit/c19a6fbae9a21a7d4693418706c59e81ed256875
However it's considerably more difficult to use libFuzzer with
non-library code -- in this case nbdkit.
2018 Jan 16
6
[PATCH nbdkit 0/3] Refactor plugin_* functions into a backend struct.
Somewhat invasive but mostly mechanical change to how plugins are
called. This patch is in preparation for adding a second backend
subtype for filters.
Rich.
2019 Jan 14
6
[PATCH nbdkit incomplete 0/5] Port to Windows.
This is an incomplete port to Windows. Currently the server compiles
and starts up successfully, but goes into an infinite loop when you
connect to it. Nevertheless I think the approach is ready for
feedback. This being Windows the changes go quite deep.
Rich.
2018 Jan 17
0
[PATCH 7/9] Implement filters.
...n_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (size_t i, const char *filename, int short_name);
+static struct backend *open_filter_so (struct backend *next, size_t i, const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -120,6 +121,7 @@ static const struct option long_options[] = {
{ "export", 1, NULL, 'e' },
{ "export-name",1, NULL, 'e' },
{ "exportname", 1, NULL, 'e' },
+ { "filter", 1, N...
2018 Jan 16
0
[PATCH nbdkit 2/3] Refactor plugin_* functions into a backend struct.
...n.c
@@ -64,7 +64,7 @@
static int is_short_name (const char *);
static char *make_random_fifo (void);
-static void open_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -103,6 +103,9 @@ volatile int quit;
int quit_fd;
static int write_quit_fd;
+/* The currently loaded plugin. */
+struct backend *backend;
+
static char *random_fifo_dir = NULL;
static char *random_fifo = NULL;
@@ -493,12 +496,12 @@ main (int argc,...
2018 Jan 17
0
[PATCH 2/9] Refactor plugin_* functions into a backend struct.
...n.c
@@ -64,7 +64,7 @@
static int is_short_name (const char *);
static char *make_random_fifo (void);
-static void open_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -103,6 +103,9 @@ volatile int quit;
int quit_fd;
static int write_quit_fd;
+/* The currently loaded plugin. */
+struct backend *backend;
+
static char *random_fifo_dir = NULL;
static char *random_fifo = NULL;
@@ -493,12 +496,12 @@ main (int argc,...
2018 Jan 16
0
[PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend struct.
...n.c
@@ -64,7 +64,7 @@
static int is_short_name (const char *);
static char *make_random_fifo (void);
-static void open_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -103,6 +103,9 @@ volatile int quit;
int quit_fd;
static int write_quit_fd;
+/* The currently loaded plugin. */
+struct backend *backend;
+
static char *random_fifo_dir = NULL;
static char *random_fifo = NULL;
@@ -493,12 +496,12 @@ main (int argc,...
2018 Jan 14
10
[PATCH nbdkit INCOMPLETE 0/6] Introduce filters to nbdkit.
This patch isn't complete (patch 6/6 isn't finished) so it's just for
discussion, although it does compile and run.
This introduces to nbdkit a concept of "filters" which can be placed
in front of plugins to modify their behaviour. Some examples where
you might use filters:
* Serve a subset of the data, such as (offset, range) or a
single partition from a disk image.
2018 Jan 16
4
[PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend
v1 -> v2:
- Fixed everything mentioned in the review.
Rich.
2017 Nov 20
10
[nbdkit PATCH v2 0/8] Support parallel transactions within single connection
I've posted some of these patches or ideas before; but now I'm
confident enough with the series that it should be ready to push;
at any rate, I can now run test-socket-activation in a tight loop
without triggering any crashes or hangs.
With this in place, I'm going back to work on making the nbd
forwarder wort with the parallel thread model.
Eric Blake (8):
sockets: Use
2020 Aug 18
15
[PATCH nbdkit 0/9] Port to Windows.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw
This is the port to Windows using native Windows APIs (not MSYS or
Cygwin).
This patch series is at the point where it basically now works. I can
run the server with the memory plugin, and access it remotely using
guestfish, creating filesystems and so on without any apparent
problems.
Nevertheless there are many
2018 Jan 19
0
[PATCH nbdkit filters-v2 2/5] Introduce filters.
...n_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (size_t i, const char *filename, int short_name);
+static struct backend *open_filter_so (struct backend *next, size_t i, const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -120,6 +121,7 @@ static const struct option long_options[] = {
{ "export", 1, NULL, 'e' },
{ "export-name",1, NULL, 'e' },
{ "exportname", 1, NULL, 'e' },
+ { "filter", 1, N...
2018 Jan 19
0
[PATCH nbdkit filters-v3 3/7] Introduce filters.
...n_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (size_t i, const char *filename, int short_name);
+static struct backend *open_filter_so (struct backend *next, size_t i, const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -120,6 +121,7 @@ static const struct option long_options[] = {
{ "export", 1, NULL, 'e' },
{ "export-name",1, NULL, 'e' },
{ "exportname", 1, NULL, 'e' },
+ { "filter", 1, N...
2020 Aug 20
15
[PATCH nbdkit 0/13] Port to Windows without using a separate library.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw-nolib
After a lot of work I have made the port to Windows work without using
a separate library. Instead, on Windows only, we build an "import
library" (library of stubs) which resolves references to nbdkit_*
functions in the main program and fixes up the plugin, basically the
first technique outlined in