summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs/nfsproto.h
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2014-07-01 20:47:16 +0000
committerrmacklem <rmacklem@FreeBSD.org>2014-07-01 20:47:16 +0000
commit8c4948bf022f4d0ea6c54e0888660a51ad7fd9a1 (patch)
tree45ff669d0736f88c136a6d51a4cc7c0fce738971 /sys/fs/nfs/nfsproto.h
parentbe0e28fbe8d0634ac036e4ac2434ae4ec3a32376 (diff)
downloadFreeBSD-src-8c4948bf022f4d0ea6c54e0888660a51ad7fd9a1.zip
FreeBSD-src-8c4948bf022f4d0ea6c54e0888660a51ad7fd9a1.tar.gz
Merge the NFSv4.1 server code in projects/nfsv4.1-server over
into head. The code is not believed to have any effect on the semantics of non-NFSv4.1 server behaviour. It is a rather large merge, but I am hoping that there will not be any regressions for the NFS server. MFC after: 1 month
Diffstat (limited to 'sys/fs/nfs/nfsproto.h')
-rw-r--r--sys/fs/nfs/nfsproto.h123
1 files changed, 119 insertions, 4 deletions
diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h
index 6836661..731be07 100644
--- a/sys/fs/nfs/nfsproto.h
+++ b/sys/fs/nfs/nfsproto.h
@@ -389,9 +389,13 @@
#define NFSV4OPEN_CLAIMPREVIOUS 1
#define NFSV4OPEN_CLAIMDELEGATECUR 2
#define NFSV4OPEN_CLAIMDELEGATEPREV 3
+#define NFSV4OPEN_CLAIMFH 4
+#define NFSV4OPEN_CLAIMDELEGATECURFH 5
+#define NFSV4OPEN_CLAIMDELEGATEPREVFH 6
#define NFSV4OPEN_DELEGATENONE 0
#define NFSV4OPEN_DELEGATEREAD 1
#define NFSV4OPEN_DELEGATEWRITE 2
+#define NFSV4OPEN_DELEGATENONEEXT 3
#define NFSV4OPEN_LIMITSIZE 1
#define NFSV4OPEN_LIMITBLOCKS 2
@@ -479,6 +483,14 @@
#define NFSV4OPEN_ACCESSREAD 0x00000001
#define NFSV4OPEN_ACCESSWRITE 0x00000002
#define NFSV4OPEN_ACCESSBOTH 0x00000003
+#define NFSV4OPEN_WANTDELEGMASK 0x0000ff00
+#define NFSV4OPEN_WANTREADDELEG 0x00000100
+#define NFSV4OPEN_WANTWRITEDELEG 0x00000200
+#define NFSV4OPEN_WANTANYDELEG 0x00000300
+#define NFSV4OPEN_WANTNODELEG 0x00000400
+#define NFSV4OPEN_WANTCANCEL 0x00000500
+#define NFSV4OPEN_WANTSIGNALDELEG 0x00010000
+#define NFSV4OPEN_WANTPUSHDELEG 0x00020000
#define NFSV4OPEN_DENYNONE 0x00000000
#define NFSV4OPEN_DENYREAD 0x00000001
@@ -486,16 +498,35 @@
#define NFSV4OPEN_DENYBOTH 0x00000003
/*
+ * Delegate_none_ext reply values.
+ */
+#define NFSV4OPEN_NOTWANTED 0
+#define NFSV4OPEN_CONTENTION 1
+#define NFSV4OPEN_RESOURCE 2
+#define NFSV4OPEN_NOTSUPPFTYPE 3
+#define NFSV4OPEN_NOTSUPPWRITEFTYPE 4
+#define NFSV4OPEN_NOTSUPPUPGRADE 5
+#define NFSV4OPEN_NOTSUPPDOWNGRADE 6
+#define NFSV4OPEN_CANCELLED 7
+#define NFSV4OPEN_ISDIR 8
+
+/*
* Open result flags
- * (The first two are in the spec. The rest are used internally.)
+ * (The first four are in the spec. The rest are used internally.)
*/
#define NFSV4OPEN_RESULTCONFIRM 0x00000002
#define NFSV4OPEN_LOCKTYPEPOSIX 0x00000004
+#define NFSV4OPEN_PRESERVEUNLINKED 0x00000008
+#define NFSV4OPEN_MAYNOTIFYLOCK 0x00000020
#define NFSV4OPEN_RFLAGS \
- (NFSV4OPEN_RESULTCONFIRM | NFSV4OPEN_LOCKTYPEPOSIX)
+ (NFSV4OPEN_RESULTCONFIRM | NFSV4OPEN_LOCKTYPEPOSIX | \
+ NFSV4OPEN_PRESERVEUNLINKED | NFSV4OPEN_MAYNOTIFYLOCK)
#define NFSV4OPEN_RECALL 0x00010000
#define NFSV4OPEN_READDELEGATE 0x00020000
#define NFSV4OPEN_WRITEDELEGATE 0x00040000
+#define NFSV4OPEN_WDRESOURCE 0x00080000
+#define NFSV4OPEN_WDCONTENTION 0x00100000
+#define NFSV4OPEN_WDNOTWANTED 0x00200000
/*
* NFS V4 File Handle types
@@ -805,6 +836,27 @@ struct nfsv3_sattr {
#define NFSATTRBIT_TIMEMODIFY 53
#define NFSATTRBIT_TIMEMODIFYSET 54
#define NFSATTRBIT_MOUNTEDONFILEID 55
+#define NFSATTRBIT_DIRNOTIFDELAY 56
+#define NFSATTRBIT_DIRENTNOTIFDELAY 57
+#define NFSATTRBIT_DACL 58
+#define NFSATTRBIT_SACL 59
+#define NFSATTRBIT_CHANGEPOLICY 60
+#define NFSATTRBIT_FSSTATUS 61
+#define NFSATTRBIT_FSLAYOUTTYPE 62
+#define NFSATTRBIT_LAYOUTHINT 63
+#define NFSATTRBIT_LAYOUTTYPE 64
+#define NFSATTRBIT_LAYOUTBLKSIZE 65
+#define NFSATTRBIT_LAYOUTALIGNMENT 66
+#define NFSATTRBIT_FSLOCATIONSINFO 67
+#define NFSATTRBIT_MDSTHRESHOLD 68
+#define NFSATTRBIT_RETENTIONGET 69
+#define NFSATTRBIT_RETENTIONSET 70
+#define NFSATTRBIT_RETENTEVTGET 71
+#define NFSATTRBIT_RETENTEVTSET 72
+#define NFSATTRBIT_RETENTIONHOLD 73
+#define NFSATTRBIT_MODESETMASKED 74
+#define NFSATTRBIT_SUPPATTREXCLCREAT 75
+#define NFSATTRBIT_FSCHARSETCAP 76
#define NFSATTRBM_SUPPORTEDATTRS 0x00000001
#define NFSATTRBM_TYPE 0x00000002
@@ -862,8 +914,29 @@ struct nfsv3_sattr {
#define NFSATTRBM_TIMEMODIFY 0x00200000
#define NFSATTRBM_TIMEMODIFYSET 0x00400000
#define NFSATTRBM_MOUNTEDONFILEID 0x00800000
-
-#define NFSATTRBIT_MAX 56
+#define NFSATTRBM_DIRNOTIFDELAY 0x01000000
+#define NFSATTRBM_DIRENTNOTIFDELAY 0x02000000
+#define NFSATTRBM_DACL 0x04000000
+#define NFSATTRBM_SACL 0x08000000
+#define NFSATTRBM_CHANGEPOLICY 0x10000000
+#define NFSATTRBM_FSSTATUS 0x20000000
+#define NFSATTRBM_FSLAYOUTTYPE 0x40000000
+#define NFSATTRBM_LAYOUTHINT 0x80000000
+#define NFSATTRBM_LAYOUTTYPE 0x00000001
+#define NFSATTRBM_LAYOUTBLKSIZE 0x00000002
+#define NFSATTRBM_LAYOUTALIGNMENT 0x00000004
+#define NFSATTRBM_FSLOCATIONSINFO 0x00000008
+#define NFSATTRBM_MDSTHRESHOLD 0x00000010
+#define NFSATTRBM_RETENTIONGET 0x00000020
+#define NFSATTRBM_RETENTIONSET 0x00000040
+#define NFSATTRBM_RETENTEVTGET 0x00000080
+#define NFSATTRBM_RETENTEVTSET 0x00000100
+#define NFSATTRBM_RETENTIONHOLD 0x00000200
+#define NFSATTRBM_MODESETMASKED 0x00000400
+#define NFSATTRBM_SUPPATTREXCLCREAT 0x00000800
+#define NFSATTRBM_FSCHARSETCAP 0x00001000
+
+#define NFSATTRBIT_MAX 77
/*
* Sets of attributes that are supported, by words in the bitmap.
@@ -871,6 +944,7 @@ struct nfsv3_sattr {
/*
* NFSATTRBIT_SUPPORTED - SUPP0 - bits 0<->31
* SUPP1 - bits 32<->63
+ * SUPP2 - bits 64<->95
*/
#define NFSATTRBIT_SUPP0 \
(NFSATTRBM_SUPPORTEDATTRS | \
@@ -937,6 +1011,8 @@ struct nfsv3_sattr {
#define NFSATTRBIT_SUPP1 NFSATTRBIT_S1
#endif
+#define NFSATTRBIT_SUPP2 NFSATTRBM_SUPPATTREXCLCREAT
+
/*
* NFSATTRBIT_SUPPSETONLY is the OR of NFSATTRBIT_TIMEACCESSSET and
* NFSATTRBIT_TIMEMODIFYSET.
@@ -947,6 +1023,7 @@ struct nfsv3_sattr {
/*
* NFSATTRBIT_SETABLE - SETABLE0 - bits 0<->31
* SETABLE1 - bits 32<->63
+ * SETABLE2 - bits 64<->95
*/
#define NFSATTRBIT_SETABLE0 \
(NFSATTRBM_SIZE | \
@@ -957,6 +1034,7 @@ struct nfsv3_sattr {
NFSATTRBM_OWNERGROUP | \
NFSATTRBM_TIMEACCESSSET | \
NFSATTRBM_TIMEMODIFYSET)
+#define NFSATTRBIT_SETABLE2 0
/*
* Set of attributes that the getattr vnode op needs.
@@ -987,6 +1065,11 @@ struct nfsv3_sattr {
NFSATTRBM_TIMEMODIFY)
/*
+ * NFSATTRBIT_GETATTR2 - bits 64<->95
+ */
+#define NFSATTRBIT_GETATTR2 0
+
+/*
* Subset of the above that the Write RPC gets.
* OR of the following bits.
* NFSATTRBIT_WRITEGETATTR0 - bits 0<->31
@@ -1013,6 +1096,11 @@ struct nfsv3_sattr {
NFSATTRBM_TIMEMODIFY)
/*
+ * NFSATTRBIT_WRITEGETATTR2 - bits 64<->95
+ */
+#define NFSATTRBIT_WRITEGETATTR2 0
+
+/*
* Set of attributes that the wccattr operation op needs.
* OR of the following bits.
* NFSATTRBIT_WCCATTR0 - bits 0<->31
@@ -1026,6 +1114,11 @@ struct nfsv3_sattr {
(NFSATTRBM_TIMEMODIFY)
/*
+ * NFSATTRBIT_WCCATTR2 - bits 64<->95
+ */
+#define NFSATTRBIT_WCCATTR2 0
+
+/*
* NFSATTRBIT_CBGETATTR0 - bits 0<->31
*/
#define NFSATTRBIT_CBGETATTR0 (NFSATTRBM_CHANGE | NFSATTRBM_SIZE)
@@ -1036,6 +1129,11 @@ struct nfsv3_sattr {
#define NFSATTRBIT_CBGETATTR1 0x0
/*
+ * NFSATTRBIT_CBGETATTR2 - bits 64<->95
+ */
+#define NFSATTRBIT_CBGETATTR2 0x0
+
+/*
* Sets of attributes that require a VFS_STATFS() call to get the
* values of.
* NFSATTRBIT_STATFS0 - bits 0<->31
@@ -1067,6 +1165,11 @@ struct nfsv3_sattr {
NFSATTRBM_TIMEDELTA)
/*
+ * NFSATTRBIT_STATFS2 - bits 64<->95
+ */
+#define NFSATTRBIT_STATFS2 0
+
+/*
* These are the bits that are needed by the nfs_statfs() call.
* (The regular getattr bits are or'd in so the vnode gets the correct
* type, etc.)
@@ -1094,6 +1197,11 @@ struct nfsv3_sattr {
NFSATTRBM_TIMEDELTA)
/*
+ * NFSGETATTRBIT_STATFS2 - bits 64<->95
+ */
+#define NFSGETATTRBIT_STATFS2 0
+
+/*
* Set of attributes for the equivalent of an nfsv3 pathconf rpc.
* NFSGETATTRBIT_PATHCONF0 - bits 0<->31
*/
@@ -1111,6 +1219,11 @@ struct nfsv3_sattr {
NFSATTRBM_NOTRUNC)
/*
+ * NFSGETATTRBIT_PATHCONF2 - bits 64<->95
+ */
+#define NFSGETATTRBIT_PATHCONF2 0
+
+/*
* Sets of attributes required by readdir and readdirplus.
* NFSATTRBIT_READDIRPLUS0 (NFSATTRBIT_GETATTR0 | NFSATTRBIT_FILEHANDLE |
* NFSATTRBIT_RDATTRERROR)
@@ -1118,6 +1231,7 @@ struct nfsv3_sattr {
#define NFSATTRBIT_READDIRPLUS0 (NFSATTRBIT_GETATTR0 | NFSATTRBM_FILEHANDLE | \
NFSATTRBM_RDATTRERROR)
#define NFSATTRBIT_READDIRPLUS1 NFSATTRBIT_GETATTR1
+#define NFSATTRBIT_READDIRPLUS2 0
/*
* Set of attributes supported by Referral vnodes.
@@ -1125,6 +1239,7 @@ struct nfsv3_sattr {
#define NFSATTRBIT_REFERRAL0 (NFSATTRBM_TYPE | NFSATTRBM_FSID | \
NFSATTRBM_RDATTRERROR | NFSATTRBM_FSLOCATIONS)
#define NFSATTRBIT_REFERRAL1 NFSATTRBM_MOUNTEDONFILEID
+#define NFSATTRBIT_REFERRAL2 0
/*
* Structure for data handled by the statfs rpc. Since some fields are
OpenPOWER on IntegriCloud