Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Dec 2019 23:51:11 +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: r355472 - head/sys/fs/nfs
Message-ID:  <201912062351.xB6NpB1w096594@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Fri Dec  6 23:51:11 2019
New Revision: 355472
URL: https://svnweb.freebsd.org/changeset/base/355472

Log:
  Add a couple of definitions for NFSv4.2 and update macros to use them.
  
  This patch adds code to macros to clear attribute bits not supported
  by NFSv4.2. For now, these bits are never set anyhow, but this prepares
  the code for the addition of NFSv4.2 support in a future commit.
  
  There will be a series of these preliminary commits that will prepare for
  a major commit of the NFSv4.2 client/server changes currently found in
  subversion under projects/nfsv42/sys.

Modified:
  head/sys/fs/nfs/nfs.h

Modified: head/sys/fs/nfs/nfs.h
==============================================================================
--- head/sys/fs/nfs/nfs.h	Fri Dec  6 23:49:37 2019	(r355471)
+++ head/sys/fs/nfs/nfs.h	Fri Dec  6 23:51:11 2019	(r355472)
@@ -335,6 +335,7 @@ struct nfsreferral {
 #define	LCL_NFSV41		0x00020000
 #define	LCL_DONEBINDCONN	0x00040000
 #define	LCL_RECLAIMONEFS	0x00080000
+#define	LCL_NFSV42		0x00100000
 
 #define	LCL_GSS		LCL_KERBV	/* Or of all mechs */
 
@@ -431,6 +432,8 @@ typedef struct {
 		(b)->bits[1] &= ~NFSATTRBIT_NFSV41_1;			\
 		(b)->bits[2] &= ~NFSATTRBIT_NFSV41_2;			\
 	}								\
+	if (((n)->nd_flag & ND_NFSV42) == 0)				\
+		(b)->bits[2] &= ~NFSATTRBIT_NFSV42_2;			\
 } while (0)
 
 #define	NFSISSET_ATTRBIT(b, p)	((b)->bits[(p) / 32] & (1 << ((p) % 32)))
@@ -457,6 +460,8 @@ typedef struct {
 		(b)->bits[1] &= ~NFSATTRBIT_NFSV41_1;			\
 		(b)->bits[2] &= ~NFSATTRBIT_NFSV41_2;			\
 	}								\
+	if (((n)->nd_flag & ND_NFSV42) == 0)				\
+		(b)->bits[2] &= ~NFSATTRBIT_NFSV42_2;			\
 } while (0)
 
 #define	NFSCLRNOTSETABLE_ATTRBIT(b, n) do { 				\
@@ -465,6 +470,8 @@ typedef struct {
 	(b)->bits[2] &= NFSATTRBIT_SETABLE2;				\
 	if (((n)->nd_flag & ND_NFSV41) == 0)				\
 		(b)->bits[2] &= ~NFSATTRBIT_NFSV41_2;			\
+	if (((n)->nd_flag & ND_NFSV42) == 0)				\
+		(b)->bits[2] &= ~NFSATTRBIT_NFSV42_2;			\
 } while (0)
 
 #define	NFSNONZERO_ATTRBIT(b)	((b)->bits[0] || (b)->bits[1] || (b)->bits[2])
@@ -701,6 +708,7 @@ struct nfsrv_descript {
 #define	ND_CURSTATEID		0x80000000
 #define	ND_SAVEDCURSTATEID	0x100000000
 #define	ND_HASSLOTID		0x200000000
+#define	ND_NFSV42		0x400000000
 
 /*
  * ND_GSS should be the "or" of all GSS type authentications.



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