Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jun 2010 16:50:09 GMT
From:      Adam Nowacki <nowak@xpam.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/147292: readahead missing in nfs client options filter list
Message-ID:  <201006011650.o51Go9xI053504@www.freebsd.org>
Resent-Message-ID: <201006011700.o51H0ADU027768@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006011650.o51Go9xI053504>