From 78b6026f7ac77d72f62f828feec9bcd84c03ec79 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Fri, 6 Dec 2019 23:51:11 +0000 Subject: [PATCH] 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. --- sys/fs/nfs/nfs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/fs/nfs/nfs.h b/sys/fs/nfs/nfs.h index c6fb59fa6b64..2c811b7150fc 100644 --- a/sys/fs/nfs/nfs.h +++ b/sys/fs/nfs/nfs.h @@ -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. -- 2.41.0