public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 3/4] mount.nfs: Support an "rdma" mount option
Date: Tue, 07 Sep 2010 12:26:27 -0400	[thread overview]
Message-ID: <20100907162627.3392.73250.stgit@seurat.1015granger.net> (raw)
In-Reply-To: <20100907162156.3392.90376.stgit@seurat.1015granger.net>

The kernel NFS client's mount option parser recognizes a stand-alone
"rdma" mount option, similar to the legacy "udp" and "tcp" options.

The mount.nfs command text-based mount option parser used to pass
"rdma" straight to the kernel, but since we've started handling MNT in
the kernel instead of in user space, "rdma" on the command line has
not worked.

Until now, no-one has noticed, especially since an "rdma" mount option
isn't documented in nfs(5).

Support "rdma" in mount.nfs command, and document it in nfs(5).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 utils/mount/network.c |    9 +++++++--
 utils/mount/nfs.man   |   11 ++++++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/utils/mount/network.c b/utils/mount/network.c
index d6b5205..d612427 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -83,6 +83,7 @@ static const char *nfs_nfs_pgmtbl[] = {
 static const char *nfs_transport_opttbl[] = {
 	"udp",
 	"tcp",
+	"rdma",
 	"proto",
 	NULL,
 };
@@ -1307,7 +1308,10 @@ nfs_nfs_protocol(struct mount_options *options, unsigned long *protocol)
 	case 1: /* tcp */
 		*protocol = IPPROTO_TCP;
 		return 1;
-	case 2: /* proto */
+	case 2: /* rdma */
+		*protocol = NFSPROTO_RDMA;
+		return 1;
+	case 3: /* proto */
 		option = po_get(options, "proto");
 		if (option != NULL) {
 			if (!nfs_get_proto(option, &family, protocol)) {
@@ -1396,10 +1400,11 @@ int nfs_nfs_proto_family(struct mount_options *options,
 	switch (po_rightmost(options, nfs_transport_opttbl)) {
 	case 0:	/* udp */
 	case 1: /* tcp */
+	case 2: /* rdma */
 		/* for compatibility; these are always AF_INET */
 		*family = AF_INET;
 		return 1;
-	case 2: /* proto */
+	case 3: /* proto */
 		option = po_get(options, "proto");
 		if (option != NULL &&
 		    !nfs_get_proto(option, &tmp_family, &protocol)) {
diff --git a/utils/mount/nfs.man b/utils/mount/nfs.man
index 3806635..10ac961 100644
--- a/utils/mount/nfs.man
+++ b/utils/mount/nfs.man
@@ -495,7 +495,10 @@ command,
 .I netid
 is a valid netid listed in
 .IR /etc/netconfig .
-Otherwise,
+The value "rdma" may also be specified.
+If the
+.B mount.nfs
+command does not have TI-RPC support, then
 .I netid
 is one of "tcp," "udp," or "rdma," and only IPv4 may be used.
 .IP
@@ -537,6 +540,12 @@ option is an alternative to specifying
 .BR proto=tcp.
 It is included for compatibility with other operating systems.
 .TP 1.5i
+.B rdma
+The
+.B rdma
+option is an alternative to specifying
+.BR proto=rdma.
+.TP 1.5i
 .BI port= n
 The numeric value of the server's NFS service port.
 If the server's NFS service is not available on the specified port,


  parent reply	other threads:[~2010-09-07 16:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07 16:25 [PATCH 0/4] Handle "proto=rdma" regressions Chuck Lever
2010-09-07 16:26 ` [PATCH 1/4] getport: Recognize "rdma" and "rdma6" netid Chuck Lever
2010-09-07 16:26 ` [PATCH 2/4] mount.nfs: Use nfs_nfs_protocol() for checking for proto=rdma Chuck Lever
2010-09-07 16:26 ` Chuck Lever [this message]
2010-09-07 16:26 ` [PATCH 4/4] mount.nfs: Prepare way for "vers=4,rdma" mounts Chuck Lever
     [not found]   ` <20100907162638.3392.14786.stgit-x+BlCsqV7M/wdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2010-09-07 20:07     ` Steve Dickson
2010-09-07 20:14       ` Chuck Lever
2010-09-07 20:30         ` Steve Dickson
2010-09-07 17:57 ` [PATCH 0/4] Handle "proto=rdma" regressions Steve Dickson
2010-09-07 19:21   ` Chuck Lever
2010-09-08 16:22     ` Steve Dickson
2010-09-09 14:50 ` Steve Dickson

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=20100907162627.3392.73250.stgit@seurat.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /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