diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2014-05-06 21:59:48 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2014-05-06 21:59:48 +0000 |
commit | 2200ec99a6495cfce788213ef24cb7aa1445a2db (patch) | |
tree | 7b0d9cbe5f0a4edf898ff7a7d2a0bf4b4abe9287 /sys/fs | |
parent | bb012fd7792d72edfd3c22511db621167dfb7642 (diff) | |
download | FreeBSD-src-2200ec99a6495cfce788213ef24cb7aa1445a2db.zip FreeBSD-src-2200ec99a6495cfce788213ef24cb7aa1445a2db.tar.gz |
MFC: r264738
For an NFSv4 mount with the "nocto" option, don't get the
up to date file attributes upon close. This reduces the
Getattr RPC count by about 65% for software builds.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/nfsclient/nfs_clvnops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index abf0757..fa1433f 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -768,7 +768,9 @@ nfs_close(struct vop_close_args *ap) /* * Get attributes so "change" is up to date. */ - if (error == 0 && nfscl_mustflush(vp) != 0) { + if (error == 0 && nfscl_mustflush(vp) != 0 && + vp->v_type == VREG && + (VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOCTO) == 0) { ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva, NULL); if (!ret) { |