search for: plugin_config

Displaying 20 results from an estimated 31 matches for "plugin_config".

2018 Jan 14
0
[PATCH nbdkit INCOMPLETE 6/6] filters: Implement chain of filters in front of ordinary plugin methods.
...++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/src/plugins.c b/src/plugins.c index 3600293..085366b 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -406,8 +406,8 @@ plugin_dump_fields (void) plugin.dump_plugin (); } -void -plugin_config (const char *key, const char *value) +static int +final_plugin_config (const char *key, const char *value) { assert (dl); @@ -422,21 +422,68 @@ plugin_config (const char *key, const char *value) exit (EXIT_FAILURE); } - if (plugin.config (key, value) == -1) - exit (EXIT_FAILURE)...
2018 Jan 16
0
[PATCH nbdkit 2/3] Refactor plugin_* functions into a backend struct.
...d *_dl, struct nbdkit_plugin *(*plugin_init) (void)); -extern void plugin_cleanup (void); -extern int plugin_thread_model (void); -extern const char *plugin_name (void); -extern void plugin_usage (void); -extern const char *plugin_version (void); -extern void plugin_dump_fields (void); -extern void plugin_config (const char *key, const char *value); -extern void plugin_config_complete (void); -extern int plugin_errno_is_preserved (void); -extern int plugin_open (struct connection *conn, int readonly); -extern void plugin_close (struct connection *conn); -extern int64_t plugin_get_size (struct connection *c...
2018 Jan 17
0
[PATCH 2/9] Refactor plugin_* functions into a backend struct.
...d *_dl, struct nbdkit_plugin *(*plugin_init) (void)); -extern void plugin_cleanup (void); -extern int plugin_thread_model (void); -extern const char *plugin_name (void); -extern void plugin_usage (void); -extern const char *plugin_version (void); -extern void plugin_dump_fields (void); -extern void plugin_config (const char *key, const char *value); -extern void plugin_config_complete (void); -extern int plugin_errno_is_preserved (void); -extern int plugin_open (struct connection *conn, int readonly); -extern void plugin_close (struct connection *conn); -extern int64_t plugin_get_size (struct connection *c...
2018 Jan 16
0
[PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend struct.
...d *_dl, struct nbdkit_plugin *(*plugin_init) (void)); -extern void plugin_cleanup (void); -extern int plugin_thread_model (void); -extern const char *plugin_name (void); -extern void plugin_usage (void); -extern const char *plugin_version (void); -extern void plugin_dump_fields (void); -extern void plugin_config (const char *key, const char *value); -extern void plugin_config_complete (void); -extern int plugin_errno_is_preserved (void); -extern int plugin_open (struct connection *conn, int readonly); -extern void plugin_close (struct connection *conn); -extern int64_t plugin_get_size (struct connection *c...
2016 Sep 27
1
Re: Memory corruption when testing nbdkit python plugin with nbd-tester-client?
...bug. plugin_lock_request() is used to lock client requests only, but it does _not_ lock any other calls into the plugin. Due to that, the following calls are neither locked against each other nor are they locked against client requests: plugin_register (const char *_filename, plugin_cleanup (void) plugin_config (const char *key, const char *value) plugin_config_complete (void) plugin_open (struct connection *conn, int readonly) plugin_close (struct connection *conn) plugin_get_size (struct connection *conn) plugin_can_write (struct connection *conn) plugin_can_flush (struct connection *conn) plugin_is_rot...
2018 Jan 16
4
[PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend
v1 -> v2: - Fixed everything mentioned in the review. Rich.
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.
2016 Mar 09
2
RFC: Proposing an LLVM subproject for parallelism runtime and support libraries
...#include "cuda/cuda_rng.h" #include "stream_executor.h" namespace se = streamexecutor; int main(int argc, char *argv[]) { se::Platform *platform = se::MultiPlatformManager::PlatformWithName("cuda").ValueOrDie(); se::PluginConfig plugin_config; plugin_config.SetRng(se::cuda::kCuRandPlugin); const int device_ordinal = 0; se::StreamExecutor *executor = platform->ExecutorForDeviceWithPluginConfig(device_ordinal, plugin_config) .ValueOrDie(); const uint8 seed[] = {0x0, 0x1, 0x2, 0x3, 0x4,...
2016 Mar 09
2
RFC: Proposing an LLVM subproject for parallelism runtime and support libraries
...gt; #include "stream_executor.h" > > namespace se = streamexecutor; > > int main(int argc, char *argv[]) { > se::Platform *platform = > se::MultiPlatformManager::PlatformWithName("cuda").ValueOrDie(); > > se::PluginConfig plugin_config; > plugin_config.SetRng(se::cuda::kCuRandPlugin); > > const int device_ordinal = 0; > se::StreamExecutor *executor = > platform->ExecutorForDeviceWithPluginConfig(device_ordinal, > plugin_config) > .ValueOrDie(); > > cons...
2016 Mar 10
2
RFC: Proposing an LLVM subproject for parallelism runtime and support libraries
...ecutor.h" >> >> namespace se = streamexecutor; >> >> int main(int argc, char *argv[]) { >> se::Platform *platform = >> se::MultiPlatformManager::PlatformWithName("cuda").ValueOrDie(); >> >> se::PluginConfig plugin_config; >> plugin_config.SetRng(se::cuda::kCuRandPlugin); >> >> const int device_ordinal = 0; >> se::StreamExecutor *executor = >> platform->ExecutorForDeviceWithPluginConfig(device_ordinal, >> plugin_config) >> .ValueO...
2012 Nov 20
0
Proposed change to the broker RESTful API and CLI to handle parameters needed in additional broker plugins
...g (for the broker slice CLI): Usage: razor broker add (options...) -p, --plugin BROKER_PLUGIN The broker plugin to use. -n, --name BROKER_NAME The name for the broker target. -d, --description DESCRIPTION A description for the broker target. -c, --config-file PLUGIN_CONFIG A file defining the configuration of the broker target -h, --help Display this screen. The additional parameters that were previously included in the API and are currently used within the existing Puppet broker plugin (i.e. the comma-separated list of servers, which...
2018 Jan 17
0
[PATCH 1/9] plugins: Move locking to a new file.
...d *_dl, struct nbdkit_plugin *(*plugin_init) (void)); extern void plugin_cleanup (void); +extern int plugin_thread_model (void); extern const char *plugin_name (void); extern void plugin_usage (void); extern const char *plugin_version (void); extern void plugin_dump_fields (void); extern void plugin_config (const char *key, const char *value); extern void plugin_config_complete (void); -extern void plugin_lock_connection (void); -extern void plugin_unlock_connection (void); -extern void plugin_lock_request (struct connection *conn); -extern void plugin_unlock_request (struct connection *conn); -exte...
2018 Jan 16
0
[PATCH nbdkit 1/3] plugins: Move locking to a new file.
...d *_dl, struct nbdkit_plugin *(*plugin_init) (void)); extern void plugin_cleanup (void); +extern int plugin_thread_model (void); extern const char *plugin_name (void); extern void plugin_usage (void); extern const char *plugin_version (void); extern void plugin_dump_fields (void); extern void plugin_config (const char *key, const char *value); extern void plugin_config_complete (void); -extern void plugin_lock_connection (void); -extern void plugin_unlock_connection (void); -extern void plugin_lock_request (struct connection *conn); -extern void plugin_unlock_request (struct connection *conn); -exte...
2019 Oct 11
0
[PATCH NOT WORKING nbdkit v2 1/2] server: Add .ready_to_serve plugin method.
...e); + + if (!p->plugin.ready_to_serve) + return; + + if (p->plugin.ready_to_serve () == -1) + exit (EXIT_FAILURE); +} + static void * plugin_open (struct backend *b, struct connection *conn, int readonly) { @@ -656,6 +671,7 @@ static struct backend plugin_functions = { .config = plugin_config, .config_complete = plugin_config_complete, .magic_config_key = plugin_magic_config_key, + .ready_to_serve = plugin_ready_to_serve, .open = plugin_open, .prepare = plugin_prepare, .finalize = plugin_finalize, diff --git a/tests/test-layers-filter.c b/tests/test-layers-filter.c index...
2018 Jan 17
14
[PATCH 0/9] Add filters to nbdkit.
The first three patches are identical to: https://www.redhat.com/archives/libguestfs/2018-January/msg00079.html "[PATCH nbdkit v2 0/3] Refactor plugin_* functions into a backend" The rest of the patches add filters using the new filter API previously described here: https://www.redhat.com/archives/libguestfs/2018-January/msg00073.html This needs a lot more testing -- and tests --
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?
...t;%s: get_ready", b->name); + + if (!p->plugin.get_ready) + return; + + if (p->plugin.get_ready () == -1) + exit (EXIT_FAILURE); +} + static int plugin_preconnect (struct backend *b, int readonly) { @@ -670,6 +685,7 @@ static struct backend plugin_functions = { .config = plugin_config, .config_complete = plugin_config_complete, .magic_config_key = plugin_magic_config_key, + .get_ready = plugin_get_ready, .preconnect = plugin_preconnect, .open = plugin_open, .prepare = plugin_prepare, diff --git a/tests/test-layers-filter.c b/tests/test-layers-filter.c index 44f62...
2016 Sep 26
2
Re: Memory corruption when testing nbdkit python plugin with nbd-tester-client?
On 26.09.2016 14:29, Richard W.M. Jones wrote: > On Mon, Sep 26, 2016 at 02:18:02PM +0200, Carl-Daniel Hailfinger wrote: >> Hi, >> >> has anyone ever run "make check" from nbd against nbdkit with a python >> plugin? I usually get segfaults during such a run, and sometimes various >> other errors happen before the segfault, suggesting that some memory
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 19
16
[nbdkit PATCH v2 00/13] Add filters + FUA support to nbdkit
A combination of the work that both Rich and I have been doing lately, where filters use only the new API with flags on every command that the client can send over the wire (we can then add support for more flags in nbdkit without having to add new callbacks, as NBD adds more flags upstream). Eric Blake (4): protocol: Split flags from cmd field in requests backend: Pass flags argument through