Patch 1 played with an early draft of Rich's Fedora 30 libnbd package:
https://bugzilla.redhat.com/show_bug.cgi?id=1713767#c17
Note that comment 21 provides a newer package 0.1.1-1 with a different
API; and that libnbd has more unreleased API changes in the pipeline
(whether that will be called 0.2 or 0.1.2); so we'll have to tweak
things based on what is actually available in distros.
Patch 2 is mechanical, to try and make patch 3 a little easier to follow.
Patch 3 shows that libnbd is currently feature-compatible with my
hand-rolled nbd client, albeit with an order-of-magnitude slowdown that
we'll have to investigate.
And patch 4 is my driving reason for this series - it solves a TODO
item about allowing the NBD plugin to be the symmetric solution for
connecting a new server that requires encryption to an old client that
can't speak it. (Although it's late enough at night that I have not
actually yet added the tests to 'make check' to exercise it.)
Also available at
https://repo.or.cz/nbdkit/ericb.git under tag
use-libnbd-v1
Eric Blake (4):
nbd: Check for libnbd
nbd: s/nbd_/nbdplug_/
nbd: Use libnbd 0.1
nbd: Add TLS client support
plugins/nbd/nbdkit-nbd-plugin.pod | 77 +-
configure.ac | 20 +
plugins/nbd/nbd-standalone.c | 1364 +++++++++++++++++++++++++++++
plugins/nbd/nbd.c | 1308 +++++++++------------------
TODO | 13 +-
plugins/nbd/Makefile.am | 25 +-
6 files changed, 1860 insertions(+), 947 deletions(-)
create mode 100644 plugins/nbd/nbd-standalone.c
--
2.20.1