From nobody@FreeBSD.org  Tue Jun  1 16:50:10 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCAEE106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Jun 2010 16:50:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A25DE8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Jun 2010 16:50:10 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o51Go9oh053505
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 1 Jun 2010 16:50:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o51Go9xI053504;
	Tue, 1 Jun 2010 16:50:09 GMT
	(envelope-from nobody)
Message-Id: <201006011650.o51Go9xI053504@www.freebsd.org>
Date: Tue, 1 Jun 2010 16:50:09 GMT
From: Adam Nowacki <nowak@xpam.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: readahead missing in nfs client options filter list
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         147292
>Category:       kern
>Synopsis:       [nfs] [patch] readahead missing in nfs client options filter list
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-fs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 01 17:00:09 UTC 2010
>Closed-Date:    Wed Oct 27 16:19:28 UTC 2010
>Last-Modified:  Wed Oct 27 16:19:28 UTC 2010
>Originator:     Adam Nowacki
>Release:        releng_8_0
>Organization:
>Environment:
FreeBSD storage 8.0-RELEASE-p3 FreeBSD 8.0-RELEASE-p3 #1: Mon May 31 23:45:45 UTC 2010     root@storage:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
In sys/nfsclient/nfs_vfsops.c:
static const char *nfs_opts[] = { "from", "nfs_args",
    "noatime", "noexec", "suiddir", "nosuid", "nosymfollow", "union",
    "noclusterr", "noclusterw", "multilabel", "acls", "force", "update",
    "async", "dumbtimer", "noconn", "nolockd", "intr", "rdirplus", "resvport",
    "readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize",
    "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", 
    "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3", "sec",
    "maxgroups", "principal",
    NULL };

this list is missing "readahead" option resulting in:
# /sbin/mount_nfs -o nfsv3,rw,async,noatime,noauto,mntudp,readahead=2,rsize=32768,wsize=32768 192.168.0.3:/mnt/ls0 /mnt/nfs/u1/mnt/ls0
mount_nfs: /mnt/nfs/u1/mnt/ls0, mount option <readahead> is unknown: Invalid argument

>How-To-Repeat:
mount a nfs with -o readahead=1

>Fix:
add "readahead" to the list of nfs options (nfs_opts), the rest of the code already appears to be there

Patch attached with submission follows:

Index: sys/nfsclient/nfs_vfsops.c
===================================================================
RCS file: /home/ncvs/src/sys/nfsclient/nfs_vfsops.c,v
retrieving revision 1.234
diff -u -r1.234 nfs_vfsops.c
--- sys/nfsclient/nfs_vfsops.c	27 May 2010 03:15:04 -0000	1.234
+++ sys/nfsclient/nfs_vfsops.c	1 Jun 2010 16:48:01 -0000
@@ -776,10 +776,10 @@
     "noatime", "noexec", "suiddir", "nosuid", "nosymfollow", "union",
     "noclusterr", "noclusterw", "multilabel", "acls", "force", "update",
     "async", "dumbtimer", "noconn", "nolockd", "intr", "rdirplus", "resvport",
-    "readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize",
-    "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", 
-    "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3", "sec",
-    "maxgroups", "principal", "negnametimeo",
+    "readdirsize", "readahead", "soft", "hard", "mntudp", "tcp", "udp",
+    "wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin",
+    "acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3", 
+    "sec", "maxgroups", "principal", "negnametimeo",
     NULL };
 
 /*


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jun 4 02:30:11 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147292 
State-Changed-From-To: open->closed 
State-Changed-By: jh 
State-Changed-When: Wed Oct 27 16:19:26 UTC 2010 
State-Changed-Why:  
Duplicate of 151321. Fixed in head (r214418). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147292 
>Unformatted:
