plugins: Expose new FUA callbacks
The NBD protocol supports Forced Unit Access (FUA) as a more efficient
way to wait for just one write to land in persistent storage, rather
than all outstanding writes at the time of a flush; modeled after
the kernel's block I/O flag of the same name. While we can emulate
the proper semantics with a full-blown flush, there are some plugins
that can properly pass the FUA flag on to the end storage and thereby
avoid some overhead.
This patch introduces new callbacks, and updates the documentation
to the new API, while ensuring that plugins compiled to the old API
still work. The new API adds .can_fua, then adds a flags parameter
to all five data callbacks, even though only three of them will use
a flag at the moment. A plugin client has to both opt in to the
version 2 API, and provide .can_fua with a return of
NBDKIT_FUA_NATIVE, before nbdkit will pass the NBDKIT_FLAG_FUA to
the plugin.
Signed-off-by: Eric Blake <eblake@redhat.com>