Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334056
b: refs/heads/master
c: 8a4c6e1
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Aug 21, 2012
1 parent 708c324 commit e7bc729
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65b2e6656bda2ad983727fcc725ac66b6d5035a7
refs/heads/master: 8a4c6e19cfed5e650045312affed7e6056383278
41 changes: 41 additions & 0 deletions trunk/Documentation/filesystems/nfs/nfsd-admin-interfaces.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Administrative interfaces for nfsd
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note that normally these interfaces are used only by the utilities in
nfs-utils.

nfsd is controlled mainly by pseudofiles under the "nfsd" filesystem,
which is normally mounted at /proc/fs/nfsd/.

The server is always started by the first write of a nonzero value to
nfsd/threads.

Before doing that, NFSD can be told which sockets to listen on by
writing to nfsd/portlist; that write may be:

- an ascii-encoded file descriptor, which should refer to a
bound (and listening, for tcp) socket, or
- "transportname port", where transportname is currently either
"udp", "tcp", or "rdma".

If nfsd is started without doing any of these, then it will create one
udp and one tcp listener at port 2049 (see nfsd_init_socks).

On startup, nfsd and lockd grace periods start.

nfsd is shut down by a write of 0 to nfsd/threads. All locks and state
are thrown away at that point.

Between startup and shutdown, the number of threads may be adjusted up
or down by additional writes to nfsd/threads or by writes to
nfsd/pool_threads.

For more detail about files under nfsd/ and what they control, see
fs/nfsd/nfsctl.c; most of them have detailed comments.

Implementation notes
^^^^^^^^^^^^^^^^^^^^

Note that the rpc server requires the caller to serialize addition and
removal of listening sockets, and startup and shutdown of the server.
For nfsd this is done using nfsd_mutex.

0 comments on commit e7bc729

Please sign in to comment.