svn commit: r210227 - head/sys/fs/nfsclient

Rick Macklem rmacklem at FreeBSD.org
Sun Jul 18 22:35:46 UTC 2010


Author: rmacklem
Date: Sun Jul 18 22:35:46 2010
New Revision: 210227
URL: http://svn.freebsd.org/changeset/base/210227

Log:
  Add a call to nfscl_mustflush() in nfs_close() of the experimental
  NFSv4 client, so that attributes are not acquired from the server
  when a delegation for the file is held. This can reduce the number
  of Getattr Ops significantly.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clvnops.c

Modified: head/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvnops.c	Sun Jul 18 20:57:53 2010	(r210226)
+++ head/sys/fs/nfsclient/nfs_clvnops.c	Sun Jul 18 22:35:46 2010	(r210227)
@@ -709,7 +709,7 @@ nfs_close(struct vop_close_args *ap)
 		/*
 		 * Get attributes so "change" is up to date.
 		 */
-		if (!error) {
+		if (error == 0 && nfscl_mustflush(vp)) {
 			ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva,
 			    NULL);
 			if (!ret) {


More information about the svn-src-head mailing list