Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jul 2010 22:35:46 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210227 - head/sys/fs/nfsclient
Message-ID:  <201007182235.o6IMZkvN081273@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007182235.o6IMZkvN081273>