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

NAME

6       nbdkit-nozero-filter - nbdkit nozero filter
7

SYNOPSIS

9        nbdkit --filter=nozero plugin [plugin-args...] \
10          [zeromode=MODE] [fastzeromode=MODE]
11

DESCRIPTION

13       "nbdkit-nozero-filter" is a filter that intentionally disables
14       efficient handling of sparse file holes (ranges of all-zero bytes)
15       across the NBD protocol.  It is mainly useful for evaluating timing
16       differences between naive vs. sparse-aware connections, and for testing
17       client or server fallbacks.
18

PARAMETERS

20       zeromode=none
21       zeromode=emulate
22       zeromode=notrim
23       zeromode=plugin
24           Optional, controls which mode the filter will use.  Mode none
25           (default) means that zero support is not advertised to the client.
26           Mode emulate means that zero support is emulated by the filter
27           using the plugin's "pwrite" callback, regardless of whether the
28           plugin itself implemented the "zero" callback with a more efficient
29           way to write zeros. Since nbdkit ≥ 1.13.4, mode notrim means that
30           zero requests are forwarded on to the plugin, except that the
31           plugin will never see the NBDKIT_MAY_TRIM flag, to determine if the
32           client permitting trimming during zero operations makes a
33           difference.  Since nbdkit ≥ 1.15.0, mode plugin leaves normal zero
34           requests up to the plugin, useful when combined with "fastzeromode"
35           for experimenting with the effects of fast zero requests.  It is an
36           error to request notrim or plugin if the plugin does not support
37           the "zero" callback.
38
39       fastzeromode=none
40       fastzeromode=slow
41       fastzeromode=ignore
42       fastzeromode=default
43           Optional since nbdkit ≥ 1.15.0, controls whether fast zeroes are
44           advertised to the client, and if so, how the filter will react to a
45           client fast zero request.  Mode none avoids advertising fast zero
46           support.  Mode slow advertises fast zero support unconditionally,
47           but treats all fast zero requests as an immediate "ENOTSUP" failure
48           rather than performing a fallback.  Mode ignore advertises fast
49           zero support, but treats all client fast zero requests as if the
50           flag had not been used (this behavior is typically contrary to the
51           NBD specification, but can be useful for comparison against the
52           actual fast zero implementation to see if fast zeroes make a
53           difference).  Mode default is selected by default; when paired with
54           "zeromode=emulate", fast zeroes are advertised but fast zero
55           requests always fail (similar to "slow"); when paired with
56           "zeromode=notrim" or "zeromode=plugin", fast zero support is left
57           to the plugin (although in the latter case, the nozero filter could
58           be omitted for the same behavior).
59

EXAMPLES

61       Serve the file disk.img, but force the client to write zeroes
62       explicitly rather than with "NBD_CMD_WRITE_ZEROES":
63
64        nbdkit --filter=nozero file disk.img
65
66       Serve the file disk.img, allowing the client to take advantage of less
67       network traffic via "NBD_CMD_WRITE_ZEROES", but fail any fast zero
68       requests up front and force all other zero requests to write data
69       explicitly rather than punching any holes:
70
71        nbdkit --filter=nozero file zeromode=emulate disk.img
72
73       Serve the file disk.img, but do not advertise fast zero support to the
74       client even if the plugin supports it:
75
76        nbdkit --filter=nozero file zeromode=plugin fastzeromode=none disk.img
77

FILES

79       $filterdir/nbdkit-nozero-filter.so
80           The filter.
81
82           Use "nbdkit --dump-config" to find the location of $filterdir.
83

VERSION

85       "nbdkit-nozero-filter" first appeared in nbdkit 1.2.
86

SEE ALSO

88       nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3),
89       nbdkit-fua-filter(1), nbdkit-nocache-filter(1),
90       nbdkit-noparallel-filter(1), nbdkit-noextents-filter(1).
91

AUTHORS

93       Eric Blake
94
96       Copyright (C) 2018-2019 Red Hat Inc.
97

LICENSE

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