0001 ==================================
0002 Administrative interfaces for nfsd
0003 ==================================
0004
0005 Note that normally these interfaces are used only by the utilities in
0006 nfs-utils.
0007
0008 nfsd is controlled mainly by pseudofiles under the "nfsd" filesystem,
0009 which is normally mounted at /proc/fs/nfsd/.
0010
0011 The server is always started by the first write of a nonzero value to
0012 nfsd/threads.
0013
0014 Before doing that, NFSD can be told which sockets to listen on by
0015 writing to nfsd/portlist; that write may be:
0016
0017 - an ascii-encoded file descriptor, which should refer to a
0018 bound (and listening, for tcp) socket, or
0019 - "transportname port", where transportname is currently either
0020 "udp", "tcp", or "rdma".
0021
0022 If nfsd is started without doing any of these, then it will create one
0023 udp and one tcp listener at port 2049 (see nfsd_init_socks).
0024
0025 On startup, nfsd and lockd grace periods start. nfsd is shut down by a write of
0026 0 to nfsd/threads. All locks and state are thrown away at that point.
0027
0028 Between startup and shutdown, the number of threads may be adjusted up
0029 or down by additional writes to nfsd/threads or by writes to
0030 nfsd/pool_threads.
0031
0032 For more detail about files under nfsd/ and what they control, see
0033 fs/nfsd/nfsctl.c; most of them have detailed comments.
0034
0035 Implementation notes
0036 ====================
0037
0038 Note that the rpc server requires the caller to serialize addition and
0039 removal of listening sockets, and startup and shutdown of the server.
0040 For nfsd this is done using nfsd_mutex.