search for: test_layers_filter_open

Displaying 16 results from an estimated 16 matches for "test_layers_filter_open".

2019 Oct 03
0
[nbdkit PATCH 4/4] server: Better documentation of .open ordering
...if (f->filter.finalize && f->filter.finalize (&next_ops, &nxdata, handle) == -1) diff --git a/tests/test-layers-filter.c b/tests/test-layers-filter.c index cccfb654..d590cf95 100644 --- a/tests/test-layers-filter.c +++ b/tests/test-layers-filter.c @@ -79,11 +79,12 @@ test_layers_filter_open (nbdkit_next_open *next, void *nxdata, int readonly) { static int handle; - DEBUG_FUNCTION; - if (next (nxdata, readonly) == -1) return NULL; + /* Debug after recursing, to show opposite order from .close */ + DEBUG_FUNCTION; + return &handle; } diff --git a/tests/test-lay...
2019 Oct 03
7
[nbdkit PATCH 0/4] More work with retry safety
I'm still working on another set of patches to have reopen call .finalize/.prepare (so that another filter can safely appear between retry and the plugin), but for tonight, these are the patches I think are ready to go. Eric Blake (4): retry: Handle can_fua and can_fast_zero changes tests: Test retry with different fua/fast-zero flags server: Close backends if a filter's .open fails
2019 Oct 11
0
[PATCH NOT WORKING nbdkit v2 1/2] server: Add .ready_to_serve plugin method.
...layers_filter_config_help \ "test_layers_" layer "_config_help" +static int +test_layers_filter_ready_to_serve (nbdkit_next_ready_to_serve *next, + void *nxdata) +{ + DEBUG_FUNCTION; + return next (nxdata); +} + static void * test_layers_filter_open (nbdkit_next_open *next, void *nxdata, int readonly) { @@ -267,6 +275,7 @@ static struct nbdkit_filter filter = { .config = test_layers_filter_config, .config_complete = test_layers_filter_config_complete, .config_help = test_layers_filter_config_help, + .ready_to_serv...
2020 Aug 25
0
[nbdkit PATCH 1/5] api: Add .default_export
...rn next (nxdata, readonly, default_only, exports); } +static const char * +test_layers_filter_default_export (nbdkit_next_default_export *next, + void *nxdata, int readonly, int is_tls) +{ + DEBUG_FUNCTION; + return next (nxdata, readonly); +} + static void * test_layers_filter_open (nbdkit_next_open *next, void *nxdata, int readonly, const char *exportname, int is_tls) @@ -380,6 +388,7 @@ static struct nbdkit_filter filter = { .after_fork = test_layers_filter_after_fork, .preconnect = test_layers_filter_preconnect, .list_export...
2020 Jul 21
4
[PATCH nbdkit] server: Pass the export name through filter .open calls.
...; h = malloc (sizeof *h); diff --git a/tests/test-layers-filter.c b/tests/test-layers-filter.c index b6ca05bd..29d8b669 100644 --- a/tests/test-layers-filter.c +++ b/tests/test-layers-filter.c @@ -107,7 +107,8 @@ test_layers_filter_preconnect (nbdkit_next_preconnect *next, } static void * -test_layers_filter_open (nbdkit_next_open *next, void *nxdata, int readonly) +test_layers_filter_open (nbdkit_next_open *next, void *nxdata, + int readonly, const char *exportname) { struct handle *h = malloc (sizeof *h); @@ -118,7 +119,7 @@ test_layers_filter_open (nbdkit_next_open *next, vo...
2019 Oct 11
3
[PATCH NOT WORKING nbdkit v2 0/2] vddk: Restructure plugin to allow greater parallelism.
This is my second attempt at this. The first version (also not working) was here: https://www.redhat.com/archives/libguestfs/2019-October/msg00062.html In part 1/2 I introduce a new .ready_to_serve plugin method which is called after forking and just before accepting any client connection. The idea would be that plugins could start background threads here. However this doesn't work well in
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?
....config = test_layers_filter_config, .config_complete = test_layers_filter_config_complete, .config_help = test_layers_filter_config_help, + .get_ready = test_layers_filter_get_ready, .preconnect = test_layers_filter_preconnect, .open = test_layers_filter_open, .close = test_layers_filter_close, diff --git a/tests/test-layers-plugin.c b/tests/test-layers-plugin.c index 10cc6efe..8858bede 100644 --- a/tests/test-layers-plugin.c +++ b/tests/test-layers-plugin.c @@ -72,6 +72,13 @@ test_layers_plugin_config_complete (void) #define test_laye...
2020 Aug 06
6
[nbdkit PATCH v2 0/5] .list_exports
Since v1: - patch 1: check size limits - patch 2: better handling of default export name canonicalization - patch 3: support filters as well as plugins - patch 4: new - patch 5: rewrite sh parser, fix testsuite to actually work and cover more cases (now that libnbd.git is fixed) Eric Blake (4): server: Add exports list functions server: Prepare to use export list from plugin log: Add
2020 Aug 07
0
[nbdkit PATCH 1/3] server: Implement nbdkit_is_tls for use during .open
...t xz_handle *h; diff --git a/tests/test-layers-filter.c b/tests/test-layers-filter.c index 397af575..5c5b3f0f 100644 --- a/tests/test-layers-filter.c +++ b/tests/test-layers-filter.c @@ -117,7 +117,7 @@ test_layers_filter_list_exports (nbdkit_next_list_exports *next, void *nxdata, static void * test_layers_filter_open (nbdkit_next_open *next, void *nxdata, - int readonly, const char *exportname) + int readonly, const char *exportname, int is_tls) { struct handle *h = malloc (sizeof *h); diff --git a/TODO b/TODO index 46f92443..262327fb 100644 --- a/TODO +++ b/...
2020 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete method before to do two different things (complete configuration; do any allocation/housekeeping necessary before we can start serving). The only questions in my mind are whether we want this before 1.18, and whether the name ("get_ready") is a good one. Rich.
2020 Aug 25
9
[nbdkit PATCH 0/5] Implement .default_export, nbdkit_string_intern
More patches on the way for improving .list_exports signature and adding .export_description, but this is the promised code showing why nbdkit_string_intern is useful. Patch 4 is somewhat RFC: we could either add new API to take the boilerplate from: foo_config(const char *key, const char *value) { if (strcmp (key, "file") == 0) { CLEANUP_FREE char *tmp = nbdkit_realpath (value);
2020 Jun 22
4
[PATCH nbdkit 1/2] server: Add .after_fork callback, mainly for plugins to create threads.
...config_complete = test_layers_filter_config_complete, .config_help = test_layers_filter_config_help, .get_ready = test_layers_filter_get_ready, + .after_fork = test_layers_filter_after_fork, .preconnect = test_layers_filter_preconnect, .open = test_layers_filter_open, .close = test_layers_filter_close, diff --git a/tests/test-layers-plugin.c b/tests/test-layers-plugin.c index 72ed03f5..ccb67fe4 100644 --- a/tests/test-layers-plugin.c +++ b/tests/test-layers-plugin.c @@ -79,6 +79,13 @@ test_layers_plugin_get_ready (void) return 0; } +static...
2020 Aug 07
7
[nbdkit PATCH 0/3] Content differentiation during --tls=on
Patch 3 still needs tests added, but it is at least working from my simple command line tests. Eric Blake (3): server: Implement nbdkit_is_tls for use during .open server: Expose final thread_model to filter's .get_ready tlsdummy: New filter docs/nbdkit-filter.pod | 21 +- docs/nbdkit-plugin.pod | 34 ++- docs/nbdkit-tls.pod
2020 Aug 27
10
[nbdkit PATCH v2 0/8] exportname filter
This is a revision of my .default_export work, plus new work on .export_descriptions and a new exportname filter. I think it is now ready to check in. Things I'd still like in 1.22: - the file plugin should implement .list_exports (patch already posted, but it needs rebasing on this series) - the ext2 filter should override .list_exports when in exportname mode - the nbd plugin should be
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update