1nbdkit-fua-filter(1)                NBDKIT                nbdkit-fua-filter(1)
2
3
4

NAME

6       nbdkit-fua-filter - nbdkit FUA filter
7

SYNOPSIS

9        nbdkit --filter=fua plugin [fuamode=MODE] [plugin-args...]
10

DESCRIPTION

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

PARAMETERS

19       fuamode=none
20       fuamode=emulate
21       fuamode=native
22       fuamode=force
23           Optional, controls which mode the filter will use.  Mode none
24           (default) means that FUA support is not advertised to the client.
25           Mode emulate causes the filter to emulate FUA support using the
26           plugin's "flush" callback, regardless of whether the plugin itself
27           supports more efficient FUA (or refuses to load if the plugin's
28           "can_flush" callback returns false).  Mode native causes the filter
29           to advertise native FUA support to earlier filters, useful for
30           comparing optimizations of FUA handling when splitting large
31           requests into sub-requests (or refuses to load if the plugin's
32           "can_fua" callback returns "NBDKIT_FUA_NONE").  Mode force causes
33           the filter to request FUA on all write transactions, even when the
34           client did not request it, and in turn treats client flush requests
35           as a no-op (or refuses to load if the plugin's "can_fua" callback
36           returns "NBDKIT_FUA_NONE").
37

EXAMPLES

39       Serve the file disk.img, but force the client to submit explicit flush
40       requests instead of using "NBD_CMD_FLAG_FUA":
41
42        nbdkit --filter=fua file disk.img
43
44       Observe that the blocksize filter optimizes its handling of the FUA
45       flag based on whether it knows nbdkit will be emulating FUA with a
46       flush, by comparing the log filter output on top of different fua
47       filter modes:
48
49        nbdkit --filter=blocksize --filter=log --filter=fua file disk.img \
50          maxlen=4k logfile=fua_emulated fuamode=emulate
51        nbdkit --filter=blocksize --filter=log --filter=fua file disk.img \
52          maxlen=4k logfile=fua_native fuamode=native
53
54       Serve the file disk.img in write-through mode, where all writes from
55       the client are immediately flushed to disk as if the client had always
56       requested FUA:
57
58        nbdkit --filter=fua file fuamode=force disk.img
59

FILES

61       $filterdir/nbdkit-fua-filter.so
62           The filter.
63
64           Use "nbdkit --dump-config" to find the location of $filterdir.
65

VERSION

67       "nbdkit-fua-filter" first appeared in nbdkit 1.2.
68

SEE ALSO

70       nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3),
71       nbdkit-blocksize-filter(1), nbdkit-log-filter(1),
72       nbdkit-nocache-filter(1), nbdkit-noextents-filter(1),
73       nbdkit-noparallel-filter(1), nbdkit-nozero-filter(1).
74

AUTHORS

76       Eric Blake
77
79       Copyright (C) 2018 Red Hat Inc.
80

LICENSE

82       Redistribution and use in source and binary forms, with or without
83       modification, are permitted provided that the following conditions are
84       met:
85
86       ·   Redistributions of source code must retain the above copyright
87           notice, this list of conditions and the following disclaimer.
88
89       ·   Redistributions in binary form must reproduce the above copyright
90           notice, this list of conditions and the following disclaimer in the
91           documentation and/or other materials provided with the
92           distribution.
93
94       ·   Neither the name of Red Hat nor the names of its contributors may
95           be used to endorse or promote products derived from this software
96           without specific prior written permission.
97
98       THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
99       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
100       IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
101       PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
102       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
103       CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
104       SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
105       BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
106       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
107       OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
108       ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
109
110
111
112nbdkit-1.16.1                     2019-12-03              nbdkit-fua-filter(1)
Impressum