1nbdkit-nozero-filter(1) NBDKIT nbdkit-nozero-filter(1)
2
3
4
6 nbdkit-nozero-filter - nbdkit nozero filter
7
9 nbdkit --filter=nozero plugin [zeromode=MODE] [plugin-args...]
10
12 "nbdkit-nozero-filter" is a filter that intentionally disables
13 efficient handling of sparse file holes (ranges of all-zero bytes)
14 across the NBD protocol. It is mainly useful for evaluating timing
15 differences between naive vs. sparse-aware connections, and for testing
16 client or server fallbacks.
17
19 zeromode=none|emulate
20 Optional, controls which mode the filter will use. Mode none
21 (default) means that zero support is not advertised to the client;
22 mode emulate means that zero support is emulated by the filter
23 using the plugin's "pwrite" callback, regardless of whether the
24 plugin itself implemented the "zero" callback with a more efficient
25 way to write zeroes.
26
28 Serve the file disk.img, but force the client to write zeroes
29 explicitly rather than with "NBD_CMD_WRITE_ZEROES":
30
31 nbdkit --filter=nozero file disk.img
32
33 Serve the file disk.img, allowing the client to take advantage of less
34 network traffic via "NBD_CMD_WRITE_ZEROES", but still forcing the data
35 to be written explicitly rather than punching any holes:
36
37 nbdkit --filter=nozero file zeromode=emulate disk.img
38
40 nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3),
41 nbdkit-noextents-filter(1).
42
44 Eric Blake
45
47 Copyright (C) 2018 Red Hat Inc.
48
50 Redistribution and use in source and binary forms, with or without
51 modification, are permitted provided that the following conditions are
52 met:
53
54 · Redistributions of source code must retain the above copyright
55 notice, this list of conditions and the following disclaimer.
56
57 · Redistributions in binary form must reproduce the above copyright
58 notice, this list of conditions and the following disclaimer in the
59 documentation and/or other materials provided with the
60 distribution.
61
62 · Neither the name of Red Hat nor the names of its contributors may
63 be used to endorse or promote products derived from this software
64 without specific prior written permission.
65
66 THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
67 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
68 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
69 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
70 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
71 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
72 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
73 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
74 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
75 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
76 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
77
78
79
80nbdkit-1.12.3 2019-05-21 nbdkit-nozero-filter(1)