search for: dba3e24

Displaying 8 results from an estimated 8 matches for "dba3e24".

2018 Feb 13
3
[nbdkit PATCH 0/2] Consistent plugin return value handling
While working on improving the backend interface to allow filters to handle errors, I noticed that I've introduced some minor incompatibilities for filters that don't quite obey the documentation which states that a callback should return only 0/-1. Prior to my additions, we treated all plugin returns other than -1 as success (sort of makes sense for a positive return, particularly if a
2018 Feb 14
2
[nbdkit PATCH v2] plugin: add and use nbdkit_realpath
...st char *value) { if (strcmp (key, "file") == 0) { /* See FILENAMES AND PATHS in nbdkit-plugin(3). */ - filename = nbdkit_absolute_path (value); + filename = nbdkit_realpath (value); if (!filename) return -1; } diff --git a/src/plugins.c b/src/plugins.c index dba3e24..595b632 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -134,7 +134,7 @@ plugin_dump_fields (struct backend *b) struct backend_plugin *p = container_of (b, struct backend_plugin, backend); char *path; - path = nbdkit_absolute_path (p->filename); + path = nbdkit_realpath (p->filen...
2018 Feb 13
3
[nbdkit PATCH] plugin: add and use nbdkit_realpath
...st char *value) { if (strcmp (key, "file") == 0) { /* See FILENAMES AND PATHS in nbdkit-plugin(3). */ - filename = nbdkit_absolute_path (value); + filename = nbdkit_realpath (value); if (!filename) return -1; } diff --git a/src/plugins.c b/src/plugins.c index dba3e24..595b632 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -134,7 +134,7 @@ plugin_dump_fields (struct backend *b) struct backend_plugin *p = container_of (b, struct backend_plugin, backend); char *path; - path = nbdkit_absolute_path (p->filename); + path = nbdkit_realpath (p->filen...
2018 Jan 24
0
[nbdkit PATCH 2/3] filter: Add .can_zero/.can_fua overrides
...(*zero) (struct backend *, struct connection *conn, uint32_t count, uint64_t offset, uint32_t flags); + int (*can_zero) (struct backend *, struct connection *conn); + int (*can_fua) (struct backend *, struct connection *conn); }; /* plugins.c */ diff --git a/src/plugins.c b/src/plugins.c index dba3e24..3468b6d 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -358,6 +358,26 @@ plugin_can_trim (struct backend *b, struct connection *conn) return p->plugin.trim != NULL; } +static int +plugin_can_zero (struct backend *b, struct connection *conn) +{ + debug ("can_zero"); + + //...
2018 Jan 24
8
[nbdkit PATCH 0/3] Add nozero filter
I still need to add testsuite coverage. Perhaps it might be easier if I create a new '--filter=log logfile=foo' filter that produces a log of which commands a client sent, then compare the log using a known client that uses write_zeroes (qemu-io works well) both with and without --filter=nozero to prove that the change in advertisement changes the commands sent over the wire (that would
2018 Feb 01
0
[nbdkit PATCH v2 1/3] backend: Rework internal/filter error return semantics
....dump_fields = filter_dump_fields, .config = filter_config, .config_complete = filter_config_complete, - .errno_is_preserved = plugin_errno_is_preserved, .open = filter_open, .prepare = filter_prepare, .finalize = filter_finalize, diff --git a/src/plugins.c b/src/plugins.c index dba3e24..c49c0f0 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -227,14 +227,6 @@ plugin_config_complete (struct backend *b) exit (EXIT_FAILURE); } -static int -plugin_errno_is_preserved (struct backend *b) -{ - struct backend_plugin *p = container_of (b, struct backend_plugin, backend); - - re...
2018 Jan 28
3
[nbdkit PATCH 0/2] RFC: tweak error handling, add log filter
Here's what I'm currently playing with; I'm not ready to commit anything until I rebase my FUA work on top of this, as I only want to break filter ABI once between releases. Eric Blake (2): backend: Rework internal/filter error return semantics filters: Add log filter TODO | 2 - docs/nbdkit-filter.pod | 84 +++++++-- docs/nbdkit.pod
2018 Feb 01
6
[nbdkit PATCH v2 0/3] add log, blocksize filters
Since v1: add the blocksize filter, add testsuite coverage of the log filter, several fixes to the log filter based on what adding tests revealed I'm still working on FUA flag support patches on top of this; the patches should all be committed in the same release, as we want to minimize the number of releases that cause a filter ABI/API bump Eric Blake (3): backend: Rework internal/filter