All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@redhat.com>
To: linux-nfs@vger.kernel.org
Cc: "J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 14/14] nfsd: document kernel interfaces for nfsd configuration
Date: Tue, 21 Aug 2012 16:57:32 -0400	[thread overview]
Message-ID: <1345582652-18476-15-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1345582652-18476-1-git-send-email-bfields@redhat.com>

From: "J. Bruce Fields" <bfields@redhat.com>

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>
---
 .../filesystems/nfs/nfsd-admin-interfaces.txt      |   41 ++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/filesystems/nfs/nfsd-admin-interfaces.txt

diff --git a/Documentation/filesystems/nfs/nfsd-admin-interfaces.txt b/Documentation/filesystems/nfs/nfsd-admin-interfaces.txt
new file mode 100644
index 0000000..56a96fb
--- /dev/null
+++ b/Documentation/filesystems/nfs/nfsd-admin-interfaces.txt
@@ -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.
-- 
1.7.9.5


      parent reply	other threads:[~2012-08-21 20:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 20:57 nfsd & svcrpc patches (mainly cleanup) for 3.7 J. Bruce Fields
2012-08-21 20:57 ` [PATCH 01/14] svcrpc: standardize svc_setup_socket return convention J. Bruce Fields
2012-08-21 20:57 ` [PATCH 02/14] svcrpc: clean up control flow J. Bruce Fields
2012-08-21 20:57 ` [PATCH 03/14] svcrpc: make svc_create_xprt enqueue on clearing XPT_BUSY J. Bruce Fields
2012-08-21 20:57 ` [PATCH 04/14] svcrpc: share some setup of listening sockets J. Bruce Fields
2012-08-21 20:57 ` [PATCH 05/14] nfsd: remove redundant "port" argument J. Bruce Fields
2012-08-21 20:57 ` [PATCH 06/14] nfsd: allow configuring nfsd to listen on 5-digit ports J. Bruce Fields
2012-08-21 21:25   ` J. Bruce Fields
2012-08-21 20:57 ` [PATCH 07/14] svcrpc: minor udp code cleanup J. Bruce Fields
2012-08-21 20:57 ` [PATCH 08/14] svcrpc: ignore unknown address type in udp receive J. Bruce Fields
2012-08-21 21:02   ` Chuck Lever
2012-08-21 21:24     ` J. Bruce Fields
2012-08-21 21:29       ` Chuck Lever
2012-08-21 21:33         ` J. Bruce Fields
2012-08-21 21:38           ` Chuck Lever
2012-08-21 21:42             ` J. Bruce Fields
2012-08-21 20:57 ` [PATCH 09/14] svcrpc: make xpo_recvfrom return only >=0 J. Bruce Fields
2012-08-21 20:57 ` [PATCH 10/14] svcrpc: remove handling of unknown errors from svc_recv J. Bruce Fields
2012-08-21 20:57 ` [PATCH 11/14] svcrpc: make svc_xprt_received static J. Bruce Fields
2012-08-21 20:57 ` [PATCH 12/14] svcrpc: break up svc_recv J. Bruce Fields
2012-08-21 20:57 ` [PATCH 13/14] svcrpc: split up svc_handle_xprt J. Bruce Fields
2012-08-21 20:57 ` J. Bruce Fields [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345582652-18476-15-git-send-email-bfields@redhat.com \
    --to=bfields@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.