plugins: Wire up rust plugin support for NBD_INFO_INIT_STATE
[nbdkit/ericb.git] / plugins / file / nbdkit-file-plugin.pod
blobd538b127e8548092bd9893ced2ce4eaa48260fca
1 =head1 NAME
3 nbdkit-file-plugin - nbdkit file plugin
5 =head1 SYNOPSIS
7  nbdkit file [file=]FILENAME
9 =head1 DESCRIPTION
11 C<nbdkit-file-plugin> is a file serving plugin for L<nbdkit(1)>.
13 It serves the named C<FILENAME> over NBD.  Local block devices
14 (eg. F</dev/sda>) may also be served.
16 To concatenate multiple files, use L<nbdkit-split-plugin(1)>.
18 If you want to expose a file that resides on a file system known to
19 have poor C<lseek(2)> performance when searching for holes (C<tmpfs>
20 is known to be one such file system), you can use
21 L<nbdkit-noextents-filter(1)> to avoid the penalty of probing for
22 holes.
24 =head1 PARAMETERS
26 =over 4
28 =item [B<file=>]FILENAME
30 Serve the file named C<FILENAME>.  A local block device name can also
31 be used here.
33 This parameter is required.
35 C<file=> is a magic config key and may be omitted in most cases.
36 See L<nbdkit(1)/Magic parameters>.
38 =item B<rdelay>
40 =item B<wdelay>
42 These plugin parameters have been moved to the
43 L<nbdkit-delay-filter(1)> filter.  Modify the command line to add
44 I<--filter=delay> in order to use these parameters.
46 =back
48 =head1 DUMP-PLUGIN OUTPUT
50 You can obtain extra information about how the file plugin was
51 compiled by doing:
53  nbdkit file --dump-plugin
55 Some of the fields which may appear are listed below.  Note these are
56 for information only and may be changed or removed at any time in the
57 future.
59 =over 4
61 =item C<file_blksszget=yes>
63 =item C<file_blkzeroout=yes>
65 If both set, the plugin may be able to efficiently zero ranges of
66 block devices, where the driver and block device itself supports this.
68 =item C<file_falloc_fl_punch_hole=yes>
70 If set, the plugin may be able to punch holes (make sparse) files and
71 block devices.
73 =item C<file_falloc_fl_zero_range=yes>
75 If set, the plugin may be able to efficiently zero ranges of files and
76 block devices.
78 =back
80 =head1 DEBUG FLAG
82 =over 4
84 =item B<-D file.zero=1>
86 This enables very verbose debugging of the NBD zero request.  This can
87 be used to tell if the file plugin is able to zero ranges in the file
88 or block device efficiently or not.
90 =back
92 =head1 FILES
94 =over 4
96 =item F<$plugindir/nbdkit-file-plugin.so>
98 The plugin.
100 Use C<nbdkit --dump-config> to find the location of C<$plugindir>.
102 =back
104 =head1 VERSION
106 C<nbdkit-file-plugin> first appeared in nbdkit 1.0.
108 =head1 SEE ALSO
110 L<nbdkit(1)>,
111 L<nbdkit-plugin(3)>,
112 L<nbdkit-split-plugin(1)>,
113 L<nbdkit-partitioning-plugin(1)>,
114 L<nbdkit-noextents-filter(1)>.
116 =head1 AUTHORS
118 Eric Blake
120 Nir Soffer
122 Richard W.M. Jones
124 =head1 COPYRIGHT
126 Copyright (C) 2013-2018 Red Hat Inc.