aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-08-15 17:43:30 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-08-21 17:42:03 -0400
commit8a4c6e19cfed5e650045312affed7e6056383278 (patch)
tree339a910e1a4f18911ad6173bd2c304e8a0e699f9 /Documentation
parent65b2e6656bda2ad983727fcc725ac66b6d5035a7 (diff)
nfsd: document kernel interfaces for nfsd configuration
These are only needed by nfs-utils. But I needed to remind myself how they worked recently and thought this might be helpful. It's short and incomplete for now as I was only interested in startup, shutdown, and configuration of listening sockets. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/nfs/nfsd-admin-interfaces.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/Documentation/filesystems/nfs/nfsd-admin-interfaces.txt b/Documentation/filesystems/nfs/nfsd-admin-interfaces.txt
new file mode 100644
index 000000000000..56a96fb08a73
--- /dev/null
+++ b/Documentation/filesystems/nfs/nfsd-admin-interfaces.txt
@@ -0,0 +1,41 @@
1Administrative interfaces for nfsd
2^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4Note that normally these interfaces are used only by the utilities in
5nfs-utils.
6
7nfsd is controlled mainly by pseudofiles under the "nfsd" filesystem,
8which is normally mounted at /proc/fs/nfsd/.
9
10The server is always started by the first write of a nonzero value to
11nfsd/threads.
12
13Before doing that, NFSD can be told which sockets to listen on by
14writing to nfsd/portlist; that write may be:
15
16 - an ascii-encoded file descriptor, which should refer to a
17 bound (and listening, for tcp) socket, or
18 - "transportname port", where transportname is currently either
19 "udp", "tcp", or "rdma".
20
21If nfsd is started without doing any of these, then it will create one
22udp and one tcp listener at port 2049 (see nfsd_init_socks).
23
24On startup, nfsd and lockd grace periods start.
25
26nfsd is shut down by a write of 0 to nfsd/threads. All locks and state
27are thrown away at that point.
28
29Between startup and shutdown, the number of threads may be adjusted up
30or down by additional writes to nfsd/threads or by writes to
31nfsd/pool_threads.
32
33For more detail about files under nfsd/ and what they control, see
34fs/nfsd/nfsctl.c; most of them have detailed comments.
35
36Implementation notes
37^^^^^^^^^^^^^^^^^^^^
38
39Note that the rpc server requires the caller to serialize addition and
40removal of listening sockets, and startup and shutdown of the server.
41For nfsd this is done using nfsd_mutex.