nbdkit-fua-filter(1) | NBDKIT | nbdkit-fua-filter(1) |
nbdkit-fua-filter - nbdkit FUA filter
nbdkit --filter=fua plugin [fuamode=MODE] [plugin-args...]
"nbdkit-fua-filter" is a filter that intentionally modifies handling of the '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.
Serve the file disk.img, but force the client to submit explicit flush requests instead of using "NBD_CMD_FLAG_FUA":
nbdkit --filter=fua file disk.img
Observe that the blocksize filter optimizes its handling of the FUA flag based on whether it knows nbdkit will be emulating FUA with a flush, by comparing the log filter output on top of different fua filter modes:
nbdkit --filter=blocksize --filter=log --filter=fua file disk.img \ maxlen=4k logfile=fua_emulated fuamode=emulate nbdkit --filter=blocksize --filter=log --filter=fua file disk.img \ maxlen=4k logfile=fua_native fuamode=native
Serve the file disk.img in write-through mode, where all writes from the client are immediately flushed to disk as if the client had always requested FUA:
nbdkit --filter=fua file fuamode=force disk.img
nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3), nbdkit-blocksize-filter(3), nbdkit-log-filter(3).
Eric Blake
Copyright (C) 2018 Red Hat Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2019-01-26 | nbdkit-1.10.3 |