svn commit: r188832 - head/sys/nfsclient

John Baldwin jhb at FreeBSD.org
Thu Feb 19 14:18:03 PST 2009


Author: jhb
Date: Thu Feb 19 22:18:00 2009
New Revision: 188832
URL: http://svn.freebsd.org/changeset/base/188832

Log:
  When fetching attributes for a file for NFSv3 mounts, do not perform an
  opportunistic ACCESS RPC to populate both the access and attribute caches
  of the file and instead always use a GETATTR RPC.  On many modern NFS
  servers, an ACCESS RPC is much more expensive to service than a GETATTR
  RPC.
  
  Submitted by:	mohans

Modified:
  head/sys/nfsclient/nfs_vnops.c

Modified: head/sys/nfsclient/nfs_vnops.c
==============================================================================
--- head/sys/nfsclient/nfs_vnops.c	Thu Feb 19 22:10:39 2009	(r188831)
+++ head/sys/nfsclient/nfs_vnops.c	Thu Feb 19 22:18:00 2009	(r188832)
@@ -644,12 +644,6 @@ nfs_getattr(struct vop_getattr_args *ap)
 	 */
 	if (nfs_getattrcache(vp, &vattr) == 0)
 		goto nfsmout;
-	if (v3 && nfsaccess_cache_timeout > 0) {
-		nfsstats.accesscache_misses++;
-		nfs3_access_otw(vp, NFSV3ACCESS_ALL, td, ap->a_cred);
-		if (nfs_getattrcache(vp, &vattr) == 0)
-			goto nfsmout;
-	}
 	nfsstats.rpccnt[NFSPROC_GETATTR]++;
 	mreq = nfsm_reqhead(vp, NFSPROC_GETATTR, NFSX_FH(v3));
 	mb = mreq;


More information about the svn-src-all mailing list