[Libguestfs] [nbdkit PATCH 0/3] Add nozero filter

Eric Blake
2018-01-24T04:10:12Z

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
also test the log filter at the same time...).

I'll wait for a review on this series, particularly since patch 2
intentionally breaks filter ABI (more ABI/API breaks on the way
when I resubmit my FUA work; it would be nice to make all the API
breaks before v1.1.29, rather than releasing versions while things
are still in flux).

Note that even if we try hard to let newer nbdkit load an older
filter (which I did not do here), we absolutely cannot let older
nbdkit load a newer filter - while we have sizing limits to
guarantee we don't call beyond the end of an older filter's
smaller struct, there are no sizing limits in the other
direction to prevent a newer filter to know that it cannot call
beyond the end of our smaller nbdkit_next_ops.

Eric Blake (3):
  connections: Don't advertise TRIM on readonly connection
  filter: Add .can_zero/.can_fua overrides
  filters: Add nozero filter

 TODO                                    |  2 +-
 configure.ac                            |  3 +-
 docs/nbdkit-filter.pod                  | 30 +++++++++++-
 docs/nbdkit.pod                         |  1 +
 filters/Makefile.am                     |  1 +
 filters/nozero/Makefile.am              | 62 ++++++++++++++++++++++++
 filters/nozero/nbdkit-nozero-filter.pod | 84 +++++++++++++++++++++++++++++++++
 filters/nozero/nozero.c                 | 68 ++++++++++++++++++++++++++
 include/nbdkit-filter.h                 |  8 +++-
 src/connections.c                       | 45 +++++++++++++-----
 src/filters.c                           | 70 ++++++++++++++++++++++++---
 src/internal.h                          |  2 +
 src/plugins.c                           | 22 +++++++++
 13 files changed, 376 insertions(+), 22 deletions(-)
 create mode 100644 filters/nozero/Makefile.am
 create mode 100644 filters/nozero/nbdkit-nozero-filter.pod
 create mode 100644 filters/nozero/nozero.c

--
2.14.3