From b0a86c9f257a1311ae8daa811c6c3b6e199f05e5 Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 4 May 2011 13:27:45 +0000 Subject: Implemented a mount option "nocto" that disables cache coherency checking at open time. It may improve performance for read-only NFS mounts. Use deliberately. MFC after: 1 week Reviewed by: rmacklem, jhb (earlier version) --- sys/nfsclient/nfs_vfsops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/nfsclient/nfs_vfsops.c') diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index ec60c94..ba3f41d 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -786,7 +786,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", + "sec", "maxgroups", "principal", "negnametimeo", "nocto", NULL }; /* @@ -901,6 +901,8 @@ nfs_mount(struct mount *mp) args.sotype = SOCK_STREAM; if (vfs_getopt(mp->mnt_optnew, "nfsv3", NULL, NULL) == 0) args.flags |= NFSMNT_NFSV3; + if (vfs_getopt(mp->mnt_optnew, "nocto", NULL, NULL) == 0) + args.flags |= NFSMNT_NOCTO; if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) { if (opt == NULL) { vfs_mount_error(mp, "illegal readdirsize"); -- cgit v1.1