Subject: Re: bin/26214 (mount(8) does not mention NFS options)
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: None <hubertf@netbsd.org>
List: netbsd-bugs
Date: 11/27/2006 00:49:18
Synopsis: mount(8) does not mention NFS options

State-Changed-From-To: open->analyzed
State-Changed-By: hubertf@netbsd.org
State-Changed-When: Mon, 27 Nov 2006 00:49:17 +0000
State-Changed-Why:
A patch was proposed during the 20061126/27 hackathon,
see http://rafb.net/paste/results/Ge0Mzr38.html:

Index: mount.8
===================================================================
RCS file: /cvsroot/src/sbin/mount/mount.8,v
retrieving revision 1.56
diff -u -r1.56 mount.8
--- mount.8     31 Oct 2006 08:12:46 -0000      1.56
+++ mount.8     26 Nov 2006 19:39:35 -0000
@@ -202,8 +202,6 @@
 binaries for architectures other than its own.
 .It Cm nosuid
 Do not allow set-user-identifier or set-group-identifier bits to take effect.
-.It Cm port
-(NFS only) Use the specified NFS port.
 .It Cm rdonly
 The same as
 .Fl r ;
Index: mount_nfs.8
===================================================================
RCS file: /cvsroot/src/sbin/mount_nfs/mount_nfs.8,v
retrieving revision 1.31
diff -u -r1.31 mount_nfs.8
--- mount_nfs.8 9 Nov 2006 10:07:00 -0000       1.31
+++ mount_nfs.8 26 Nov 2006 19:39:39 -0000
@@ -55,9 +55,9 @@
 .Bk -words
 .Op Fl a Ar maxreadahead
 .Ek
-.Bk -words
-.Op Fl g Ar maxgroups
-.Ek
+.\".Bk -words
+.\".Op Fl g Ar maxgroups
+.\".Ek
 .Bk -words
 .Op Fl o Ar options
 .Ek
@@ -198,13 +198,13 @@
 mounts that exhibit high retry rates,
 since it is possible that the dynamically estimated timeout interval is too
 short.
-.It Fl g
-Set the maximum size of the group list for the credentials to the
-specified value.
-This should be used for mounts on old servers that cannot handle a
-group list size of 16, as specified in RFC 1057.
-Try 8, if users in a lot of groups cannot get response from the mount
-point.
+.\".It Fl g
+.\"Set the maximum size of the group list for the credentials to the
+.\"specified value.
+.\"This should be used for mounts on old servers that cannot handle a
+.\"group list size of 16, as specified in RFC 1057.
+.\"Try 8, if users in a lot of groups cannot get response from the mount
+.\"point.
 .It Fl i
 Make the mount interruptible, which implies that file system calls that
 are delayed due to an unresponsive server will fail with
@@ -232,7 +232,90 @@
 flag followed by a comma separated string of options.
 See the
 .Xr mount 8
-man page for possible options and their meanings.
+man page for general mount options.
+Options specific to NFS are:
+.Bl -tag -width deadthresh
+.It Cm bg
+See
+.Fl b
+option.
+.It Cm conn
+See
+.Fl C
+option.
+.It Cm dumbtimer
+See
+.Fl d
+option.
+.It Cm intr
+See
+.Fl i
+option.
+.\".It Cm maxgrps
+.\"See
+.\".Fl g
+.\"option.
+.It Cm mntudp
+See
+.Fl U
+option.
+.It Cm nfsv2
+See
+.Fl 2
+option.
+.It Cm nfsv3
+See
+.Fl 3
+option.
+.It Cm noresport
+See
+.Fl p
+option.
+.It Cm nqnfs
+See
+.Fl q
+option.
+.It Cm port
+Use the specified NFS port.
+.It Cm readahead
+See
+.Fl a
+option.
+.It Cm rdirplus
+See
+.Fl l
+option.
+.It Cm rdirsize
+See
+.Fl I
+option.
+.It Cm retrans
+See
+.Fl x
+option.
+.It Cm rsize
+See
+.Fl r
+option.
+.It Cm seqpacket
+Use SOCK_SEQPACKET type sockets. (Only supported for the ISO protocol.)
+.It Cm soft
+See
+.Fl s
+option.
+.It Cm timeo
+See
+.Fl t
+option.
+.It Cm tcp
+See
+.Fl T
+option.
+.It Cm wsize
+See
+.Fl w
+option.
+.El
 .It Fl p
 Do not use a reserved port number for RPCs.
 This option is provided only to be able to mimic the old
Index: mount_nfs.c
===================================================================
RCS file: /cvsroot/src/sbin/mount_nfs/mount_nfs.c,v
retrieving revision 1.53
diff -u -r1.53 mount_nfs.c
--- mount_nfs.c 9 Nov 2006 10:07:00 -0000       1.53
+++ mount_nfs.c 26 Nov 2006 19:39:43 -0000
@@ -329,9 +329,7 @@
                        }
 #endif
                        if (altflags & ALTF_LEASETERM) {
-                               nfsargsp->leaseterm =
-                               (int)getmntoptnum(mp, "leaseterm");
-                               nfsargsp->flags |= NFSMNT_LEASETERM;
+                               /* ignored */
                        }
                        if (altflags & ALTF_READAHEAD) {
                                nfsargsp->readahead =
@@ -339,9 +337,7 @@
                                nfsargsp->flags |= NFSMNT_READAHEAD;
                        }
                        if (altflags & ALTF_DEADTHRESH) {
-                               nfsargsp->deadthresh = 
-                                   (int)getmntoptnum(mp, "deadthresh");
-                               nfsargsp->flags |= NFSMNT_DEADTHRESH;
+                               /* ignored */
                        }
                        if (altflags & ALTF_TIMEO) {
                                nfsargsp->timeo = 
@@ -537,9 +533,8 @@
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: mount_nfs %s\n%s\n%s\n%s\n%s\n",
-"[-23bcCdilpPqsTUX] [-a maxreadahead] [-D deadthresh]",
-"\t[-g maxgroups] [-I readdirsize] [-L leaseterm]",
+       (void)fprintf(stderr, "usage: mount_nfs %s\n%s\n%s\n%s\n",
+"[-23bcCdilpPqsTUX] [-a maxreadahead] [-I readdirsize]",
 "\t[-o options] [-R retrycnt] [-r readsize] [-t timeout]",
 "\t[-w writesize] [-x retrans]",
 "\trhost:path node");