From: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>
To: mchehab+samsung@kernel.org, corbet@lwn.net
Cc: linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org,
"Daniel W. S. Almeida" <dwlsalmeida@gmail.com>,
linux-doc@vger.kernel.org
Subject: [Linux-kernel-mentees] [PATCH v4 1/9] Documentation: convert nfs.txt to ReST
Date: Fri, 10 Jan 2020 20:24:23 -0300 [thread overview]
Message-ID: <cb9f2da2f2f6dd432b4cf9e05f79f74f4d54b6ab.1578697871.git.dwlsalmeida@gmail.com> (raw)
In-Reply-To: <cover.1578697871.git.dwlsalmeida@gmail.com>
From: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>
This patch converts nfs.txt to RST. It also moves it to admin-guide.
The reason for moving it is because this document contains information
useful for system administrators, as noted on the following paragraph:
'The purpose of this document is to provide information on some of the
special features of the NFS client that can be configured by system
administrators'.
Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
---
Documentation/admin-guide/index.rst | 1 +
Documentation/admin-guide/nfs/index.rst | 8 ++
.../nfs/nfs-client.rst} | 85 ++++++++++---------
3 files changed, 54 insertions(+), 40 deletions(-)
create mode 100644 Documentation/admin-guide/nfs/index.rst
rename Documentation/{filesystems/nfs/nfs.txt => admin-guide/nfs/nfs-client.rst} (75%)
diff --git a/Documentation/admin-guide/index.rst b/Documentation/admin-guide/index.rst
index 4405b7485312..4433f3929481 100644
--- a/Documentation/admin-guide/index.rst
+++ b/Documentation/admin-guide/index.rst
@@ -76,6 +76,7 @@ configure specific aspects of kernel behavior to your liking.
device-mapper/index
efi-stub
ext4
+ nfs/index
gpio/index
highuid
hw_random
diff --git a/Documentation/admin-guide/nfs/index.rst b/Documentation/admin-guide/nfs/index.rst
new file mode 100644
index 000000000000..2fe77091c25c
--- /dev/null
+++ b/Documentation/admin-guide/nfs/index.rst
@@ -0,0 +1,8 @@
+=============
+NFS
+=============
+
+.. toctree::
+ :maxdepth: 1
+
+ nfs-client
diff --git a/Documentation/filesystems/nfs/nfs.txt b/Documentation/admin-guide/nfs/nfs-client.rst
similarity index 75%
rename from Documentation/filesystems/nfs/nfs.txt
rename to Documentation/admin-guide/nfs/nfs-client.rst
index f2571c8bef74..c4b777c7584b 100644
--- a/Documentation/filesystems/nfs/nfs.txt
+++ b/Documentation/admin-guide/nfs/nfs-client.rst
@@ -1,3 +1,6 @@
+==========
+NFS Client
+==========
The NFS client
==============
@@ -59,10 +62,11 @@ The DNS resolver
NFSv4 allows for one server to refer the NFS client to data that has been
migrated onto another server by means of the special "fs_locations"
-attribute. See
- http://tools.ietf.org/html/rfc3530#section-6
-and
- http://tools.ietf.org/html/draft-ietf-nfsv4-referrals-00
+attribute. See `RFC3530 Section 6: Filesystem Migration and Replication`_ and
+`Implementation Guide for Referrals in NFSv4`_.
+
+.. _RFC3530 Section 6\: Filesystem Migration and Replication: http://tools.ietf.org/html/rfc3530#section-6
+.. _Implementation Guide for Referrals in NFSv4: http://tools.ietf.org/html/draft-ietf-nfsv4-referrals-00
The fs_locations information can take the form of either an ip address and
a path, or a DNS hostname and a path. The latter requires the NFS client to
@@ -78,8 +82,8 @@ Assuming that the user has the 'rpc_pipefs' filesystem mounted in the usual
(2) If no valid entry exists, the helper script '/sbin/nfs_cache_getent'
(may be changed using the 'nfs.cache_getent' kernel boot parameter)
is run, with two arguments:
- - the cache name, "dns_resolve"
- - the hostname to resolve
+ - the cache name, "dns_resolve"
+ - the hostname to resolve
(3) After looking up the corresponding ip address, the helper script
writes the result into the rpc_pipefs pseudo-file
@@ -94,43 +98,44 @@ Assuming that the user has the 'rpc_pipefs' filesystem mounted in the usual
script, and <ttl> is the 'time to live' of this cache entry (in
units of seconds).
- Note: If <ip address> is invalid, say the string "0", then a negative
- entry is created, which will cause the kernel to treat the hostname
- as having no valid DNS translation.
+ .. note::
+ If <ip address> is invalid, say the string "0", then a negative
+ entry is created, which will cause the kernel to treat the hostname
+ as having no valid DNS translation.
A basic sample /sbin/nfs_cache_getent
=====================================
-
-#!/bin/bash
-#
-ttl=600
-#
-cut=/usr/bin/cut
-getent=/usr/bin/getent
-rpc_pipefs=/var/lib/nfs/rpc_pipefs
-#
-die()
-{
- echo "Usage: $0 cache_name entry_name"
- exit 1
-}
-
-[ $# -lt 2 ] && die
-cachename="$1"
-cache_path=${rpc_pipefs}/cache/${cachename}/channel
-
-case "${cachename}" in
- dns_resolve)
- name="$2"
- result="$(${getent} hosts ${name} | ${cut} -f1 -d\ )"
- [ -z "${result}" ] && result="0"
- ;;
- *)
- die
- ;;
-esac
-echo "${result} ${name} ${ttl}" >${cache_path}
-
+.. code-block:: sh
+
+ #!/bin/bash
+ #
+ ttl=600
+ #
+ cut=/usr/bin/cut
+ getent=/usr/bin/getent
+ rpc_pipefs=/var/lib/nfs/rpc_pipefs
+ #
+ die()
+ {
+ echo "Usage: $0 cache_name entry_name"
+ exit 1
+ }
+
+ [ $# -lt 2 ] && die
+ cachename="$1"
+ cache_path=${rpc_pipefs}/cache/${cachename}/channel
+
+ case "${cachename}" in
+ dns_resolve)
+ name="$2"
+ result="$(${getent} hosts ${name} | ${cut} -f1 -d\ )"
+ [ -z "${result}" ] && result="0"
+ ;;
+ *)
+ die
+ ;;
+ esac
+ echo "${result} ${name} ${ttl}" >${cache_path}
--
2.24.1
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next prev parent reply other threads:[~2020-01-10 23:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 23:24 [Linux-kernel-mentees] [PATCH v4 0/9] Documentation: nfs: Convert a few documents to RST and move them to admin-guide Daniel W. S. Almeida
2020-01-10 23:24 ` Daniel W. S. Almeida [this message]
2020-01-10 23:24 ` [Linux-kernel-mentees] [PATCH v4 2/9] Documentation: nfsroot.txt: convert to ReST Daniel W. S. Almeida
2020-01-10 23:24 ` [Linux-kernel-mentees] [PATCH v4 3/9] Documentation: nfsroot.rst: COSMETIC: refill a paragraph Daniel W. S. Almeida
2020-01-10 23:24 ` [Linux-kernel-mentees] [PATCH v4 4/9] Documentation: nfs-rdma: convert to ReST Daniel W. S. Almeida
2020-01-10 23:24 ` [Linux-kernel-mentees] [PATCH v4 5/9] Documentation: convert nfsd-admin-interfaces " Daniel W. S. Almeida
2020-01-10 23:24 ` [Linux-kernel-mentees] [PATCH v4 6/9] Documentation: nfs: idmapper: convert " Daniel W. S. Almeida
2020-01-10 23:24 ` [Linux-kernel-mentees] [PATCH v4 7/9] Documentation: nfs: convert pnfs-block-server " Daniel W. S. Almeida
2020-01-10 23:24 ` [Linux-kernel-mentees] [PATCH v4 8/9] Documentation: nfs: pnfs-scsi-server: convert " Daniel W. S. Almeida
2020-01-10 23:24 ` [Linux-kernel-mentees] [PATCH v4 9/9] Documentation: nfs: fault_injection: " Daniel W. S. Almeida
2020-01-16 19:51 ` [Linux-kernel-mentees] [PATCH v4 0/9] Documentation: nfs: Convert a few documents to RST and move them to admin-guide Jonathan Corbet
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=cb9f2da2f2f6dd432b4cf9e05f79f74f4d54b6ab.1578697871.git.dwlsalmeida@gmail.com \
--to=dwlsalmeida@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+samsung@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).