[Libguestfs] [nbdkit PATCH 0/7] Initial implementation of FUA flag passthrough

Eric Blake eblake at redhat.com
Tue Jan 16 02:51:40 UTC 2018


Tested via:
term1$ qemu-nbd -k $PWD/sock -t -f raw -x foo junk --trace=nbd_\*
term2$ ./nbdkit -f -v -e bar nbd socket=$PWD/sock export=foo
term3$ qemu-io -t none -f raw nbd://localhost:10809/bar --trace=nbd_\*

and checking the traces to see that 'w 0 1' vs. 'w -f 0 1' was able
to influence whether the FUA flag showed up at the server in term1.

Still to go: figure out how to expose the flags through the language
bindings

Patch 7 is RFC; Rich and I debated on IRC whether we want it (the
code in plugin_register() sounds like it tries hard to support
newer plugins with older nbdkit), or whether we should just drop
the patch and state that a user either manually supplies back-compat
variants (tedious boilerplate for the user to supply, especially
since newer nbdkit will never call the older functions) or just
document that newer plugins combined with old nbdkit is not
guaranteed to work.

Eric Blake (7):
  connections: Ignore FUA flag on read/flush
  protocol: Split flags from cmd field in requests
  plugins: Move FUA fallback to plugins
  plugins: Add callbacks for FUA semantics
  plugins: Implement FUA support
  nbd: Wire up FUA flag passthrough
  RFC: plugins: Add back-compat for new plugin with old nbdkit

 docs/nbdkit-plugin.pod  | 77 +++++++++++++++++++++++++++++++++++++--
 docs/nbdkit.pod         |  8 +++--
 include/nbdkit-plugin.h | 34 +++++++++++++++++-
 plugins/nbd/nbd.c       | 64 ++++++++++++++++++++-------------
 src/connections.c       | 46 +++++++++++++-----------
 src/internal.h          |  9 ++---
 src/plugins.c           | 96 +++++++++++++++++++++++++++++++++++++++----------
 src/protocol.h          | 10 +++---
 8 files changed, 266 insertions(+), 78 deletions(-)

-- 
2.14.3




More information about the Libguestfs mailing list