1nbdkit-fua-filter(1) NBDKIT nbdkit-fua-filter(1)
2
3
4
6 nbdkit-fua-filter - nbdkit FUA filter
7
9 nbdkit --filter=fua plugin [fuamode=MODE] [plugin-args...]
10
12 "nbdkit-fua-filter" is a filter that intentionally modifies handling of
13 the 'Forced Unit Access' (FUA) flag across the NBD protocol. It is
14 mainly useful for testing client or server fallbacks, and for
15 evaluating timing differences between proper use of FUA compared to a
16 full flush.
17
19 fuamode=none|emulate|native|force
20 Optional, controls which mode the filter will use. Mode none
21 (default) means that FUA support is not advertised to the client.
22 Mode emulate causes the filter to emulate FUA support using the
23 plugin's "flush" callback, regardless of whether the plugin itself
24 supports more efficient FUA (or refuses to load if the plugin's
25 "can_flush" callback returns false). Mode native causes the filter
26 to advertise native FUA support to earlier filters, useful for
27 comparing optimizations of FUA handling when splitting large
28 requests into sub-requests (or refuses to load if the plugin's
29 "can_fua" callback returns "NBDKIT_FUA_NONE"). Mode force causes
30 the filter to request FUA on all write transactions, even when the
31 client did not request it, and in turn treats client flush requests
32 as a no-op (or refuses to load if the plugin's "can_fua" callback
33 returns "NBDKIT_FUA_NONE").
34
36 Serve the file disk.img, but force the client to submit explicit flush
37 requests instead of using "NBD_CMD_FLAG_FUA":
38
39 nbdkit --filter=fua file disk.img
40
41 Observe that the blocksize filter optimizes its handling of the FUA
42 flag based on whether it knows nbdkit will be emulating FUA with a
43 flush, by comparing the log filter output on top of different fua
44 filter modes:
45
46 nbdkit --filter=blocksize --filter=log --filter=fua file disk.img \
47 maxlen=4k logfile=fua_emulated fuamode=emulate
48 nbdkit --filter=blocksize --filter=log --filter=fua file disk.img \
49 maxlen=4k logfile=fua_native fuamode=native
50
51 Serve the file disk.img in write-through mode, where all writes from
52 the client are immediately flushed to disk as if the client had always
53 requested FUA:
54
55 nbdkit --filter=fua file fuamode=force disk.img
56
58 nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3),
59 nbdkit-blocksize-filter(1), nbdkit-log-filter(1).
60
62 Eric Blake
63
65 Copyright (C) 2018 Red Hat Inc.
66
68 Redistribution and use in source and binary forms, with or without
69 modification, are permitted provided that the following conditions are
70 met:
71
72 · Redistributions of source code must retain the above copyright
73 notice, this list of conditions and the following disclaimer.
74
75 · Redistributions in binary form must reproduce the above copyright
76 notice, this list of conditions and the following disclaimer in the
77 documentation and/or other materials provided with the
78 distribution.
79
80 · Neither the name of Red Hat nor the names of its contributors may
81 be used to endorse or promote products derived from this software
82 without specific prior written permission.
83
84 THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
85 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
86 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
87 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
88 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
89 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
90 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
91 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
92 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
93 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
94 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
95
96
97
98nbdkit-1.12.3 2019-05-21 nbdkit-fua-filter(1)