Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2011 22:31:42 +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: r222233 - head/sys/fs/nfsclient
Message-ID:  <201105232231.p4NMVg61040588@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon May 23 22:31:42 2011
New Revision: 222233
URL: http://svn.freebsd.org/changeset/base/222233

Log:
  Set the MNT_NFS4ACLS flag for an NFSv4 client mount
  if the NFSv4 server supports it. Requested by trasz.
  
  MFC after:	2 weeks

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

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Mon May 23 22:02:15 2011	(r222232)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Mon May 23 22:31:42 2011	(r222233)
@@ -79,6 +79,7 @@ FEATURE(nfscl, "NFSv4 client");
 extern int nfscl_ticks;
 extern struct timeval nfsboottime;
 extern struct nfsstats	newnfsstats;
+extern int nfsrv_useacl;
 
 MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "New NFS request header");
 MALLOC_DEFINE(M_NEWNFSMNT, "newnfsmnt", "New NFS mount struct");
@@ -1331,6 +1332,15 @@ mountnfs(struct nfs_args *argp, struct m
 		if (argp->flags & NFSMNT_NFSV3)
 			ncl_fsinfo(nmp, *vpp, cred, td);
 	
+		/* Mark if the mount point supports NFSv4 ACLs. */
+		if ((argp->flags & NFSMNT_NFSV4) != 0 && nfsrv_useacl != 0 &&
+		    ret == 0 &&
+		    NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL)) {
+			MNT_ILOCK(mp);
+			mp->mnt_flag |= MNT_NFS4ACLS;
+			MNT_IUNLOCK(mp);
+		}
+	
 		/*
 		 * Lose the lock but keep the ref.
 		 */



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