From owner-freebsd-bugs@FreeBSD.ORG  Tue Jun  1 17:00:10 2010
Return-Path: <owner-freebsd-bugs@FreeBSD.ORG>
Delivered-To: freebsd-bugs@hub.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ADB9F1065675
	for <freebsd-bugs@hub.freebsd.org>;
	Tue,  1 Jun 2010 17:00:10 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 67EB18FC19
	for <freebsd-bugs@hub.freebsd.org>;
	Tue,  1 Jun 2010 17:00:10 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o51H0AqT027769
	for <freebsd-bugs@freefall.freebsd.org>; Tue, 1 Jun 2010 17:00:10 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o51H0ADU027768;
	Tue, 1 Jun 2010 17:00:10 GMT (envelope-from gnats)
Resent-Date: Tue, 1 Jun 2010 17:00:10 GMT
Resent-Message-Id: <201006011700.o51H0ADU027768@freefall.freebsd.org>
Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer)
Resent-To: freebsd-bugs@FreeBSD.org
Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Adam Nowacki <nowak@xpam.de>
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
X-Send-Pr-Version: www-3.1
Cc: 
Subject: kern/147292: readahead missing in nfs client options filter list
X-BeenThere: freebsd-bugs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports <freebsd-bugs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-bugs>,
	<mailto:freebsd-bugs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-bugs>
List-Post: <mailto:freebsd-bugs@freebsd.org>
List-Help: <mailto:freebsd-bugs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-bugs>,
	<mailto:freebsd-bugs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Jun 2010 17:00:10 -0000


>Number:         147292
>Category:       kern
>Synopsis:       readahead missing in nfs client options filter list
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 01 17:00:09 UTC 2010
>Closed-Date:
>Last-Modified:
>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:
>Unformatted: