summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-11-14 18:52:07 +0000
committerjhb <jhb@FreeBSD.org>2011-11-14 18:52:07 +0000
commitf9a9982805b688c7eb9ed62f7d180ba340511e32 (patch)
tree9da0fdb34d06a3c5aaed0de7b141708f61c83c95 /sys/nfsclient
parent65c5ac5c93b170ba48d9eefb0a8926923bd9792e (diff)
downloadFreeBSD-src-f9a9982805b688c7eb9ed62f7d180ba340511e32.zip
FreeBSD-src-f9a9982805b688c7eb9ed62f7d180ba340511e32.tar.gz
Finish making 'wcommitsize' an NFS client mount option.
Reviewed by: rmacklem MFC after: 1 week
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vfsops.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 6bcc9b5..42895d0 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -787,7 +787,7 @@ static const char *nfs_opts[] = { "from", "nfs_args",
"readahead", "readdirsize", "soft", "hard", "mntudp", "tcp", "udp",
"wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin",
"acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3",
- "sec", "maxgroups", "principal", "negnametimeo", "nocto",
+ "sec", "maxgroups", "principal", "negnametimeo", "nocto", "wcommitsize",
NULL };
/*
@@ -1019,6 +1019,15 @@ nfs_mount(struct mount *mp)
}
args.flags |= NFSMNT_ACDIRMAX;
}
+ if (vfs_getopt(mp->mnt_optnew, "wcommitsize", (void **)&opt, NULL) == 0) {
+ ret = sscanf(opt, "%d", &args.wcommitsize);
+ if (ret != 1 || args.wcommitsize < 0) {
+ vfs_mount_error(mp, "illegal wcommitsize: %s", opt);
+ error = EINVAL;
+ goto out;
+ }
+ args.flags |= NFSMNT_WCOMMITSIZE;
+ }
if (vfs_getopt(mp->mnt_optnew, "deadthresh", (void **)&opt, NULL) == 0) {
ret = sscanf(opt, "%d", &args.deadthresh);
if (ret != 1 || args.deadthresh <= 0) {
OpenPOWER on IntegriCloud