mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
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
This commit is contained in:
parent
3e057a2477
commit
5428c66130
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188832
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user