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.
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to