diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2014-04-21 19:10:23 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2014-04-21 19:10:23 +0000 |
commit | 36db983e6fb575a6450f514a4ff6fe589d104483 (patch) | |
tree | c98a25ccc0d8ff4174915e25642a5626b63b47b2 /sys/fs/nfsclient | |
parent | a3c80349e7d6aa6322ba05792d53942ade57df9d (diff) | |
download | FreeBSD-src-36db983e6fb575a6450f514a4ff6fe589d104483.zip FreeBSD-src-36db983e6fb575a6450f514a4ff6fe589d104483.tar.gz |
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.
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient')
-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 73e5ed9..43774dd 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -767,7 +767,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) { |