diff options
Diffstat (limited to 'include/linux/nfs4.h')
-rw-r--r-- | include/linux/nfs4.h | 166 |
1 files changed, 1 insertions, 165 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index af2d2fa30eee..e111fa419a4e 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -9,168 +9,11 @@ | |||
9 | * Kendrick Smith <kmsmith@umich.edu> | 9 | * Kendrick Smith <kmsmith@umich.edu> |
10 | * Andy Adamson <andros@umich.edu> | 10 | * Andy Adamson <andros@umich.edu> |
11 | */ | 11 | */ |
12 | |||
13 | #ifndef _LINUX_NFS4_H | 12 | #ifndef _LINUX_NFS4_H |
14 | #define _LINUX_NFS4_H | 13 | #define _LINUX_NFS4_H |
15 | 14 | ||
16 | #include <linux/types.h> | ||
17 | |||
18 | #define NFS4_BITMAP_SIZE 2 | ||
19 | #define NFS4_VERIFIER_SIZE 8 | ||
20 | #define NFS4_STATEID_SEQID_SIZE 4 | ||
21 | #define NFS4_STATEID_OTHER_SIZE 12 | ||
22 | #define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE) | ||
23 | #define NFS4_FHSIZE 128 | ||
24 | #define NFS4_MAXPATHLEN PATH_MAX | ||
25 | #define NFS4_MAXNAMLEN NAME_MAX | ||
26 | #define NFS4_OPAQUE_LIMIT 1024 | ||
27 | #define NFS4_MAX_SESSIONID_LEN 16 | ||
28 | |||
29 | #define NFS4_ACCESS_READ 0x0001 | ||
30 | #define NFS4_ACCESS_LOOKUP 0x0002 | ||
31 | #define NFS4_ACCESS_MODIFY 0x0004 | ||
32 | #define NFS4_ACCESS_EXTEND 0x0008 | ||
33 | #define NFS4_ACCESS_DELETE 0x0010 | ||
34 | #define NFS4_ACCESS_EXECUTE 0x0020 | ||
35 | |||
36 | #define NFS4_FH_PERSISTENT 0x0000 | ||
37 | #define NFS4_FH_NOEXPIRE_WITH_OPEN 0x0001 | ||
38 | #define NFS4_FH_VOLATILE_ANY 0x0002 | ||
39 | #define NFS4_FH_VOL_MIGRATION 0x0004 | ||
40 | #define NFS4_FH_VOL_RENAME 0x0008 | ||
41 | |||
42 | #define NFS4_OPEN_RESULT_CONFIRM 0x0002 | ||
43 | #define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004 | ||
44 | |||
45 | #define NFS4_SHARE_ACCESS_MASK 0x000F | ||
46 | #define NFS4_SHARE_ACCESS_READ 0x0001 | ||
47 | #define NFS4_SHARE_ACCESS_WRITE 0x0002 | ||
48 | #define NFS4_SHARE_ACCESS_BOTH 0x0003 | ||
49 | #define NFS4_SHARE_DENY_READ 0x0001 | ||
50 | #define NFS4_SHARE_DENY_WRITE 0x0002 | ||
51 | #define NFS4_SHARE_DENY_BOTH 0x0003 | ||
52 | |||
53 | /* nfs41 */ | ||
54 | #define NFS4_SHARE_WANT_MASK 0xFF00 | ||
55 | #define NFS4_SHARE_WANT_NO_PREFERENCE 0x0000 | ||
56 | #define NFS4_SHARE_WANT_READ_DELEG 0x0100 | ||
57 | #define NFS4_SHARE_WANT_WRITE_DELEG 0x0200 | ||
58 | #define NFS4_SHARE_WANT_ANY_DELEG 0x0300 | ||
59 | #define NFS4_SHARE_WANT_NO_DELEG 0x0400 | ||
60 | #define NFS4_SHARE_WANT_CANCEL 0x0500 | ||
61 | |||
62 | #define NFS4_SHARE_WHEN_MASK 0xF0000 | ||
63 | #define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000 | ||
64 | #define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED 0x20000 | ||
65 | |||
66 | #define NFS4_CDFC4_FORE 0x1 | ||
67 | #define NFS4_CDFC4_BACK 0x2 | ||
68 | #define NFS4_CDFC4_BOTH 0x3 | ||
69 | #define NFS4_CDFC4_FORE_OR_BOTH 0x3 | ||
70 | #define NFS4_CDFC4_BACK_OR_BOTH 0x7 | ||
71 | |||
72 | #define NFS4_CDFS4_FORE 0x1 | ||
73 | #define NFS4_CDFS4_BACK 0x2 | ||
74 | #define NFS4_CDFS4_BOTH 0x3 | ||
75 | |||
76 | #define NFS4_SET_TO_SERVER_TIME 0 | ||
77 | #define NFS4_SET_TO_CLIENT_TIME 1 | ||
78 | |||
79 | #define NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE 0 | ||
80 | #define NFS4_ACE_ACCESS_DENIED_ACE_TYPE 1 | ||
81 | #define NFS4_ACE_SYSTEM_AUDIT_ACE_TYPE 2 | ||
82 | #define NFS4_ACE_SYSTEM_ALARM_ACE_TYPE 3 | ||
83 | |||
84 | #define ACL4_SUPPORT_ALLOW_ACL 0x01 | ||
85 | #define ACL4_SUPPORT_DENY_ACL 0x02 | ||
86 | #define ACL4_SUPPORT_AUDIT_ACL 0x04 | ||
87 | #define ACL4_SUPPORT_ALARM_ACL 0x08 | ||
88 | |||
89 | #define NFS4_ACE_FILE_INHERIT_ACE 0x00000001 | ||
90 | #define NFS4_ACE_DIRECTORY_INHERIT_ACE 0x00000002 | ||
91 | #define NFS4_ACE_NO_PROPAGATE_INHERIT_ACE 0x00000004 | ||
92 | #define NFS4_ACE_INHERIT_ONLY_ACE 0x00000008 | ||
93 | #define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010 | ||
94 | #define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020 | ||
95 | #define NFS4_ACE_IDENTIFIER_GROUP 0x00000040 | ||
96 | |||
97 | #define NFS4_ACE_READ_DATA 0x00000001 | ||
98 | #define NFS4_ACE_LIST_DIRECTORY 0x00000001 | ||
99 | #define NFS4_ACE_WRITE_DATA 0x00000002 | ||
100 | #define NFS4_ACE_ADD_FILE 0x00000002 | ||
101 | #define NFS4_ACE_APPEND_DATA 0x00000004 | ||
102 | #define NFS4_ACE_ADD_SUBDIRECTORY 0x00000004 | ||
103 | #define NFS4_ACE_READ_NAMED_ATTRS 0x00000008 | ||
104 | #define NFS4_ACE_WRITE_NAMED_ATTRS 0x00000010 | ||
105 | #define NFS4_ACE_EXECUTE 0x00000020 | ||
106 | #define NFS4_ACE_DELETE_CHILD 0x00000040 | ||
107 | #define NFS4_ACE_READ_ATTRIBUTES 0x00000080 | ||
108 | #define NFS4_ACE_WRITE_ATTRIBUTES 0x00000100 | ||
109 | #define NFS4_ACE_DELETE 0x00010000 | ||
110 | #define NFS4_ACE_READ_ACL 0x00020000 | ||
111 | #define NFS4_ACE_WRITE_ACL 0x00040000 | ||
112 | #define NFS4_ACE_WRITE_OWNER 0x00080000 | ||
113 | #define NFS4_ACE_SYNCHRONIZE 0x00100000 | ||
114 | #define NFS4_ACE_GENERIC_READ 0x00120081 | ||
115 | #define NFS4_ACE_GENERIC_WRITE 0x00160106 | ||
116 | #define NFS4_ACE_GENERIC_EXECUTE 0x001200A0 | ||
117 | #define NFS4_ACE_MASK_ALL 0x001F01FF | ||
118 | |||
119 | #define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001 | ||
120 | #define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002 | ||
121 | #define EXCHGID4_FLAG_BIND_PRINC_STATEID 0x00000100 | ||
122 | |||
123 | #define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000 | ||
124 | #define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000 | ||
125 | #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 | ||
126 | #define EXCHGID4_FLAG_MASK_PNFS 0x00070000 | ||
127 | |||
128 | #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 | ||
129 | #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 | ||
130 | /* | ||
131 | * Since the validity of these bits depends on whether | ||
132 | * they're set in the argument or response, have separate | ||
133 | * invalid flag masks for arg (_A) and resp (_R). | ||
134 | */ | ||
135 | #define EXCHGID4_FLAG_MASK_A 0x40070103 | ||
136 | #define EXCHGID4_FLAG_MASK_R 0x80070103 | ||
137 | |||
138 | #define SEQ4_STATUS_CB_PATH_DOWN 0x00000001 | ||
139 | #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002 | ||
140 | #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED 0x00000004 | ||
141 | #define SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED 0x00000008 | ||
142 | #define SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED 0x00000010 | ||
143 | #define SEQ4_STATUS_ADMIN_STATE_REVOKED 0x00000020 | ||
144 | #define SEQ4_STATUS_RECALLABLE_STATE_REVOKED 0x00000040 | ||
145 | #define SEQ4_STATUS_LEASE_MOVED 0x00000080 | ||
146 | #define SEQ4_STATUS_RESTART_RECLAIM_NEEDED 0x00000100 | ||
147 | #define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200 | ||
148 | #define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400 | ||
149 | |||
150 | #define NFS4_SECINFO_STYLE4_CURRENT_FH 0 | ||
151 | #define NFS4_SECINFO_STYLE4_PARENT 1 | ||
152 | |||
153 | #define NFS4_MAX_UINT64 (~(u64)0) | ||
154 | |||
155 | /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. | ||
156 | * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly. | ||
157 | */ | ||
158 | #define NFS4_MAX_OPS 8 | ||
159 | |||
160 | /* Our NFS4 client back channel server only wants the cb_sequene and the | ||
161 | * actual operation per compound | ||
162 | */ | ||
163 | #define NFS4_MAX_BACK_CHANNEL_OPS 2 | ||
164 | |||
165 | enum nfs4_acl_whotype { | ||
166 | NFS4_ACL_WHO_NAMED = 0, | ||
167 | NFS4_ACL_WHO_OWNER, | ||
168 | NFS4_ACL_WHO_GROUP, | ||
169 | NFS4_ACL_WHO_EVERYONE, | ||
170 | }; | ||
171 | |||
172 | #ifdef __KERNEL__ | ||
173 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <uapi/linux/nfs4.h> | ||
174 | 17 | ||
175 | struct nfs4_ace { | 18 | struct nfs4_ace { |
176 | uint32_t type; | 19 | uint32_t type; |
@@ -673,10 +516,3 @@ struct nfs4_deviceid { | |||
673 | }; | 516 | }; |
674 | 517 | ||
675 | #endif | 518 | #endif |
676 | #endif | ||
677 | |||
678 | /* | ||
679 | * Local variables: | ||
680 | * c-basic-offset: 8 | ||
681 | * End: | ||
682 | */ | ||