search for: f293e6a

Displaying 3 results from an estimated 3 matches for "f293e6a".

2019 May 20
0
[nbdkit PATCH 1/2] plugins: Add .thread_model callback
...struct nbdkit_extents *extents); int (*can_cache) (void *handle); int (*cache) (void *handle, uint32_t count, uint64_t offset, uint32_t flags); + + int (*thread_model) (void); }; extern void nbdkit_set_error (int err); diff --git a/server/plugins.c b/server/plugins.c index f293e6a..85736bb 100644 --- a/server/plugins.c +++ b/server/plugins.c @@ -87,8 +87,18 @@ static int plugin_thread_model (struct backend *b) { struct backend_plugin *p = container_of (b, struct backend_plugin, backend); + int thread_model = p->plugin._thread_model; + int r; - return p->plugin...
2019 May 20
3
[nbdkit PATCH 0/2] More on .thread_model
Rich pointed out that making thread_model dynamic even for plugins makes some sense, so here is the code for doing it for 'sh'. I'm less confident on how to do it for OCaml and Rust (not to mention that those allow the plugin to already compile in their model, rather than the language binding glue forcing a model). The other languages (lua, perl, python, ruby) still need to be
2019 May 16
27
[nbdkit PATCH v2 00/24] implement NBD_CMD_CACHE
Since v1: - rework .can_cache to be tri-state, with default of no advertisement (ripple effect through other patches) - add a lot more patches in order to round out filter support And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so in theory we now have a way to test cache commands through the entire stack. Eric Blake (24): server: Internal hooks for implementing