Displaying 20 results from an estimated 1000 matches similar to: "[nbdkit PATCH] plugins: Add .can_zero callback"
2019 May 10
1
[nbdkit PATCH] nozero: Add notrim mode
It may be useful to test whether the client's use of
NBD_CMD_FLAG_NO_HOLE makes a difference; do this by adding a mode to
--filter=nozero to force a non-trimming zero write.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
filters/nozero/nbdkit-nozero-filter.pod | 19 +++++++----
filters/nozero/nozero.c | 45 ++++++++++++++++++++-----
tests/test-nozero.sh
2018 Sep 11
0
[PATCH nbdkit 4/4] tests: Add a helper function which waits for nbdkit to start up.
This assumes bashisms, but bash is required to run the tests.
This is mostly simple refactoring. Except for the test-memory*.sh
tests where nbdkit used to run in the foreground, but that seems to be
a consequence of some left over debugging.
---
tests/functions.sh.in | 35 ++++++++++++++++++++
tests/test-blocksize.sh | 23 +++----------
tests/test-cache.sh
2018 Sep 13
0
[PATCH v2 nbdkit 5/5] tests: Add a helper function which waits for nbdkit to start up.
This assumes bashisms, but bash is required to run the tests.
This is mostly refactoring. However the changes (simplifications) are
quite substantial:
- Since the new start_nbdkit helper function cleans up nbdkit on
exit, most scripts no longer need to deal with the pid or kill the
pid in the cleanup function.
- As a result, cleanup functions are radically simpler, and often
2018 Sep 07
0
[PATCH nbdkit 3/6] file: Make the file= parameter into a magic config key.
---
docs/nbdkit-captive.pod | 4 ++--
docs/nbdkit-plugin.pod | 2 +-
docs/nbdkit-service.pod | 2 +-
docs/nbdkit-tls.pod | 2 +-
filters/cow/nbdkit-cow-filter.pod | 4 ++--
filters/delay/nbdkit-delay-filter.pod | 2 +-
filters/error/nbdkit-error-filter.pod | 6 +++---
2018 Sep 08
0
[PATCH nbdkit v2 3/6] file: Make the file= parameter into a magic config key.
---
docs/nbdkit-captive.pod | 4 ++--
docs/nbdkit-plugin.pod | 2 +-
docs/nbdkit-service.pod | 2 +-
docs/nbdkit-tls.pod | 2 +-
filters/cow/nbdkit-cow-filter.pod | 4 ++--
filters/delay/nbdkit-delay-filter.pod | 2 +-
filters/error/nbdkit-error-filter.pod | 6 +++---
2018 Sep 11
7
[PATCH nbdkit 0/4] tests: Move common functions into tests/functions.sh
Combine much common code into tests/functions.sh.
Patch 1: Preparation for patch 3.
Patch 2: Fix a long-standing bug in how man pages links are generated.
Patch 3: Common code for iterating a test function over every plugin.
Patch 4: Common code for starting nbdkit in a test and waiting for the
PID file to appear. This is the largest and most complex of
the patches but is
2018 Jan 24
0
[nbdkit PATCH 2/3] filter: Add .can_zero/.can_fua overrides
While our plugin code always advertises WRITE_ZEROES on writable
connections (because we can emulate .zero by calling .pwrite),
and FUA support when .flush exists (because we can emulate the
persistence by calling .flush), it is conceivable that a filter
may want to explicitly avoid advertising particular bits. (More
to the point, I plan on writing a 'nozero' filter that hides
2018 Sep 13
8
[PATCH v2 nbdkit 0/5] tests: Move common functions into tests/functions.sh
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00057.html
v2:
- Fix tab vs spaces in configure.ac.
- To generate list of plugins, use printf instead of xargs.
- Use 'source ./functions.sh' instead of 'source functions'.
- functions.sh: Consistent quoting in foreach_plugin function.
- functions.sh: Change the contract of start_nbdkit so it
2018 Sep 07
7
[PATCH nbdkit 0/6] plugins: Implement magic config key.
Remove the need to use file= (and in future other) parameters for many
plugins. eg. Using the file plugin becomes:
nbdkit file disk.img
Rich.
2018 Sep 08
8
[PATCH nbdkit v2 0/6] plugins: Implement magic config key.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html
v2:
- As discussed in the patch review, tighten up the characters
permitted in keys.
- Update documentation to note that relative paths can be made
safe by prefixing with ./ and absolute paths do not need any
extra steps.
- I pushed patch 1/6 from the v1 series since it was just a trivial
2018 Sep 10
7
[PATCH nbdkit v3 0/6] plugins: Implement magic config key.
v1: https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html
v2: https://www.redhat.com/archives/libguestfs/2018-September/msg00034.html
v3:
- Fixed is_config_key zero length test.
- Fixed is_config_key so it uses strspn and is not O(n^2).
- Changed >= 1.7 to >= 1.8 in the documentation.
Rich.
2019 Aug 19
2
[nbdkit PATCH] noextents: Add hook to cripple SR advertisement
When we added support for .extents, we had nbdkit unconditionally
support structured replies if the client requests them, and the
plugin's .can_extents has no impact on what the server advertises.
However, while the plugin API doesn't care whether the client
requested SR, there is still a case to be made for allowing a filter
to prevent SR, at least for testing purposese (such as
2018 Mar 08
19
[nbdkit PATCH v3 00/15] Add FUA support to nbdkit
After more than a month since v2 [1], I've finally got my FUA
support series polished. This is all of my outstanding patches,
even though some of them were originally posted in separate
threads from the original FUA post [2], [3]
[1] https://www.redhat.com/archives/libguestfs/2018-January/msg00113.html
[2] https://www.redhat.com/archives/libguestfs/2018-January/msg00219.html
[3]
2019 Aug 23
2
[nbdkit PATCH 3/3] plugins: Add .can_fast_zero hook
Allow plugins to affect the handling of the new NBD_CMD_FLAG_FAST_ZERO
flag, then update affected plugins. In particular, in-memory plugins
are always fast; the full plugin is better served by omitting .zero
and relying on .pwrite fallback; nbd takes advantage of libnbd
extensions proposed in parallel to pass through support; and
v2 language bindings expose the choice to their scripts.
The
2019 Mar 12
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
This pair of calls allows plugins to describe which extents in the
virtual disk are allocated, holes or zeroes.
---
docs/nbdkit-filter.pod | 22 +++++++++++
docs/nbdkit-plugin.pod | 86 +++++++++++++++++++++++++++++++++++++++++
include/nbdkit-common.h | 14 ++++++-
include/nbdkit-filter.h | 12 +++++-
include/nbdkit-plugin.h | 6 ++-
server/internal.h | 7 +++-
server/filters.c |
2019 Jan 04
0
[PATCH nbdkit 1/7] server: Implement NBD_FLAG_CAN_MULTI_CONN.
>From the protocol document:
"NBD_FLAG_CAN_MULTI_CONN: Indicates that the server operates
entirely without cache, or that the cache it uses is shared among
all connections to the given device. In particular, if this flag is
present, then the effects of NBD_CMD_FLUSH and NBD_CMD_FLAG_FUA MUST
be visible across all connections when the server sends its reply to
that command to
2019 Aug 30
0
[nbdkit PATCH 6/9] server: Cache per-connection can_FOO flags
Similar to the previous patch in caching size, we want to avoid
calling into the plugin more than once per connection on any of the
flag determination callbacks.
The following script demonstrates the speedup, where we avoid repeated
calls into a slow can_fua. Pre-patch:
$ cat script
case "$1" in
get_size) echo 1m;;
can_fua) sleep 1; echo native;;
can_write | can_zero |
2018 Aug 01
0
[PATCH v2 nbdkit 3/6] filters: Print filter name in debugging messages.
nbdkit_debug implicitly prints the plugin name. However this leads to
confusing debug messages such as:
nbdkit: pattern[1]: debug: prepare
nbdkit: pattern[1]: debug: prepare
(in this instance, two different prepare functions were called in
different filters, but neither filter name was shown).
By printing the filter name in the debug message we improve the output:
nbdkit: pattern[1]:
2019 Mar 12
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
This pair of calls allows plugins to describe which extents in the
virtual disk are allocated, holes or zeroes.
---
docs/nbdkit-filter.pod | 45 +++++++++++++++++
docs/nbdkit-plugin.pod | 106 ++++++++++++++++++++++++++++++++++++++++
include/nbdkit-common.h | 18 ++++++-
include/nbdkit-filter.h | 12 ++++-
include/nbdkit-plugin.h | 6 ++-
server/internal.h | 7 ++-
server/extents.c
2018 Sep 13
0
[PATCH v2 nbdkit 4/5] tests: Use a generic cleanup mechanism instead of explicit trap.
Thanks: Eric Blake for the suggestion here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00069.html
---
tests/functions.sh.in | 25 +++++++++++++++++++++++++
tests/test-blocksize.sh | 9 ++-------
tests/test-cache.sh | 9 ++-------
tests/test-cow.sh | 9 ++-------
tests/test-data-7E.sh | 9