[Libguestfs] [nbdkit PATCH v2 0/8] exportname filter

Eric Blake
2020-08-27T02:16:44Z

This is a revision of my .default_export work, plus new work on
.export_descriptions and a new exportname filter.  I think it is
now ready to check in.

Things I'd still like in 1.22:
- the file plugin should implement .list_exports (patch already posted,
but it needs rebasing on this series)
- the ext2 filter should override .list_exports when in exportname mode
- the nbd plugin should be able to use libnbd 1.4 features for .list_exports
- more language bindings for new functions (perl, python, ocaml, ...)

nice to have, but can be post-release:
- the file plugin in dir= mode should have default=none|largest (default
behavior none says "" is an error because it is not a file, setting it
to largest picks the largest file in the directory for "")
- the tar filter should consider an exportname mode
- figure out how to let filters open the plugin without a current
connection into the filter

Eric Blake (8):
  api: Add .default_export
  api: Add nbdkit_add_default_export
  server: Respond to NBD_INFO_NAME request
  api: Add nbdkit_str[n]dup_intern helper
  sh, eval: Implement .default_export
  api: Alter .list_exports
  api: Add .export_description
  exportname: New filter

 docs/nbdkit-filter.pod                        |  56 ++-
 docs/nbdkit-plugin.pod                        | 123 ++++++-
 docs/nbdkit-protocol.pod                      |  14 +
 .../exportname/nbdkit-exportname-filter.pod   | 154 ++++++++
 filters/ext2/nbdkit-ext2-filter.pod           |   5 +
 filters/log/nbdkit-log-filter.pod             |   2 +-
 plugins/eval/nbdkit-eval-plugin.pod           |   6 +
 plugins/file/nbdkit-file-plugin.pod           |   9 +-
 plugins/sh/nbdkit-sh-plugin.pod               |  39 +-
 include/nbdkit-common.h                       |   6 +
 include/nbdkit-filter.h                       |  13 +-
 include/nbdkit-plugin.h                       |   4 +-
 configure.ac                                  |   2 +
 filters/exportname/Makefile.am                |  67 ++++
 tests/Makefile.am                             |   8 +-
 server/internal.h                             |  22 +-
 server/backend.c                              |  93 +++--
 server/connections.c                          |   2 +-
 server/exports.c                              |  32 +-
 server/filters.c                              |  31 +-
 server/main.c                                 |  26 +-
 server/nbdkit.syms                            |   3 +
 server/plugins.c                              |  44 ++-
 server/protocol-handshake-newstyle.c          |  87 ++++-
 server/public.c                               |  48 +++
 server/test-public.c                          |   9 +-
 plugins/sh/methods.h                          |   2 +
 plugins/cc/cc.c                               |  73 ++--
 plugins/eval/eval.c                           |  70 ++--
 plugins/ondemand/ondemand.c                   |  11 +-
 plugins/sh/methods.c                          |  84 ++++-
 plugins/sh/sh.c                               |  70 ++--
 plugins/sh/example.sh                         |   2 +-
 filters/exportname/exportname.c               | 342 ++++++++++++++++++
 filters/log/log.c                             |  18 +-
 filters/tls-fallback/tls-fallback.c           |  60 ++-
 tests/test-eval-exports.sh                    |  34 +-
 tests/test-export-info.sh                     | 111 ++++++
 tests/test-exportname.sh                      | 184 ++++++++++
 tests/test-tls-fallback.sh                    |  53 ++-
 tests/test-layers-filter.c                    |  13 +-
 tests/test-layers-plugin.c                    |   8 +
 tests/test-layers.c                           |  24 +-
 TODO                                          |  20 +-
 44 files changed, 1790 insertions(+), 294 deletions(-)
 create mode 100644 filters/exportname/nbdkit-exportname-filter.pod
 create mode 100644 filters/exportname/Makefile.am
 create mode 100644 filters/exportname/exportname.c
 create mode 100755 tests/test-export-info.sh
 create mode 100755 tests/test-exportname.sh

--
2.28.0