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

Rick Macklem rmacklem at FreeBSD.org
Wed Apr 23 22:13:11 UTC 2014


Author: rmacklem
Date: Wed Apr 23 22:13:10 2014
New Revision: 264842
URL: http://svnweb.freebsd.org/changeset/base/264842

Log:
  Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
  so that it only does the RPC for names that are answered by the RPC.
  Doing the RPC for other names is harmless, but unnecessary.
  
  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	Wed Apr 23 22:06:43 2014	(r264841)
+++ head/sys/fs/nfsclient/nfs_clvnops.c	Wed Apr 23 22:13:10 2014	(r264842)
@@ -3429,12 +3429,15 @@ nfs_pathconf(struct vop_pathconf_args *a
 	struct thread *td = curthread;
 	int attrflag, error;
 
-	if (NFS_ISV4(vp) || (NFS_ISV3(vp) && (ap->a_name == _PC_LINK_MAX ||
+	if ((NFS_ISV34(vp) && (ap->a_name == _PC_LINK_MAX ||
 	    ap->a_name == _PC_NAME_MAX || ap->a_name == _PC_CHOWN_RESTRICTED ||
-	    ap->a_name == _PC_NO_TRUNC))) {
+	    ap->a_name == _PC_NO_TRUNC)) ||
+	    (NFS_ISV4(vp) && ap->a_name == _PC_ACL_NFS4)) {
 		/*
 		 * Since only the above 4 a_names are returned by the NFSv3
 		 * Pathconf RPC, there is no point in doing it for others.
+		 * For NFSv4, the Pathconf RPC (actually a Getattr Op.) can
+		 * be used for _PC_NFS4_ACL as well.
 		 */
 		error = nfsrpc_pathconf(vp, &pc, td->td_ucred, td, &nfsva,
 		    &attrflag, NULL);


More information about the svn-src-head mailing list