On 5/22/20 4:32 PM, Richard W.M. Jones wrote:
This drops all FUA and flush requests. --- filters/fua/nbdkit-fua-filter.pod | 27 +++++++++++++++++---- filters/fua/fua.c | 39 +++++++++++++++++++++++++++---- tests/test-fua.sh | 33 ++++++++++++++++---------- 3 files changed, 79 insertions(+), 20 deletions(-)
Overall, the series looks good to me. I don't know if there are any other man pages where we should call attention to the fact about the new mode.
diff --git a/filters/fua/nbdkit-fua-filter.pod b/filters/fua/nbdkit-fua-filter.pod index 3d20b56a..4f564fab 100644 --- a/filters/fua/nbdkit-fua-filter.pod +++ b/filters/fua/nbdkit-fua-filter.pod @@ -9,10 +9,12 @@ nbdkit-fua-filter - modify nbdkit flush and Forced Unit Access (FUA) =head1 DESCRIPTION
C<nbdkit-fua-filter> is a filter that intentionally modifies handling -of the S<“Forced Unit Access”> (FUA) flag across the NBD protocol. It -is mainly useful for testing client or server fallbacks, and for -evaluating timing differences between proper use of FUA compared to a -full flush. +of the S<“Forced Unit Access”> (FUA) flag across the NBD protocol. + +This filter can be used to disable FUA and flush requests for speed +(although this is unsafe). Also it can be used to test client or +server fallbacks, and for evaluating timing differences between proper +use of FUA compared to a full flush.
=head1 PARAMETERS
@@ -53,6 +55,15 @@ returns C<NBDKIT_FUA_NONE>. Pass through FUA and flush requests unchanged. Turns the filter into a no-op.
+=item B<fuamode=discard> + +The filter will discard FUA and flush requests. + +B<This mode is unsafe>: If the NBD disk contains a filesystem then you +will likely lose data in the event of a crash. It should only be used +for ephemeral data which you can easily recreate, such as caches, +builds, test data, etc.
Also, we may want to mention when this mode was introduced (since if you don't have 1.22 installed, you can't use it yet). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org