diff options
Diffstat (limited to 'include/linux/nfsd/nfsd.h')
-rw-r--r-- | include/linux/nfsd/nfsd.h | 225 |
1 files changed, 155 insertions, 70 deletions
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index e19f45991b2e..2b49d676d0c9 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -23,7 +23,7 @@ | |||
23 | /* | 23 | /* |
24 | * nfsd version | 24 | * nfsd version |
25 | */ | 25 | */ |
26 | #define NFSD_SUPPORTED_MINOR_VERSION 0 | 26 | #define NFSD_SUPPORTED_MINOR_VERSION 1 |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * Flags for nfsd_permission | 29 | * Flags for nfsd_permission |
@@ -53,6 +53,7 @@ typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); | |||
53 | extern struct svc_program nfsd_program; | 53 | extern struct svc_program nfsd_program; |
54 | extern struct svc_version nfsd_version2, nfsd_version3, | 54 | extern struct svc_version nfsd_version2, nfsd_version3, |
55 | nfsd_version4; | 55 | nfsd_version4; |
56 | extern u32 nfsd_supported_minorversion; | ||
56 | extern struct mutex nfsd_mutex; | 57 | extern struct mutex nfsd_mutex; |
57 | extern struct svc_serv *nfsd_serv; | 58 | extern struct svc_serv *nfsd_serv; |
58 | 59 | ||
@@ -105,7 +106,7 @@ void nfsd_close(struct file *); | |||
105 | __be32 nfsd_read(struct svc_rqst *, struct svc_fh *, struct file *, | 106 | __be32 nfsd_read(struct svc_rqst *, struct svc_fh *, struct file *, |
106 | loff_t, struct kvec *, int, unsigned long *); | 107 | loff_t, struct kvec *, int, unsigned long *); |
107 | __be32 nfsd_write(struct svc_rqst *, struct svc_fh *,struct file *, | 108 | __be32 nfsd_write(struct svc_rqst *, struct svc_fh *,struct file *, |
108 | loff_t, struct kvec *,int, unsigned long, int *); | 109 | loff_t, struct kvec *,int, unsigned long *, int *); |
109 | __be32 nfsd_readlink(struct svc_rqst *, struct svc_fh *, | 110 | __be32 nfsd_readlink(struct svc_rqst *, struct svc_fh *, |
110 | char *, int *); | 111 | char *, int *); |
111 | __be32 nfsd_symlink(struct svc_rqst *, struct svc_fh *, | 112 | __be32 nfsd_symlink(struct svc_rqst *, struct svc_fh *, |
@@ -149,6 +150,7 @@ int nfsd_set_posix_acl(struct svc_fh *, int, struct posix_acl *); | |||
149 | 150 | ||
150 | enum vers_op {NFSD_SET, NFSD_CLEAR, NFSD_TEST, NFSD_AVAIL }; | 151 | enum vers_op {NFSD_SET, NFSD_CLEAR, NFSD_TEST, NFSD_AVAIL }; |
151 | int nfsd_vers(int vers, enum vers_op change); | 152 | int nfsd_vers(int vers, enum vers_op change); |
153 | int nfsd_minorversion(u32 minorversion, enum vers_op change); | ||
152 | void nfsd_reset_versions(void); | 154 | void nfsd_reset_versions(void); |
153 | int nfsd_create_serv(void); | 155 | int nfsd_create_serv(void); |
154 | 156 | ||
@@ -186,78 +188,119 @@ void nfsd_lockd_shutdown(void); | |||
186 | /* | 188 | /* |
187 | * These macros provide pre-xdr'ed values for faster operation. | 189 | * These macros provide pre-xdr'ed values for faster operation. |
188 | */ | 190 | */ |
189 | #define nfs_ok __constant_htonl(NFS_OK) | 191 | #define nfs_ok cpu_to_be32(NFS_OK) |
190 | #define nfserr_perm __constant_htonl(NFSERR_PERM) | 192 | #define nfserr_perm cpu_to_be32(NFSERR_PERM) |
191 | #define nfserr_noent __constant_htonl(NFSERR_NOENT) | 193 | #define nfserr_noent cpu_to_be32(NFSERR_NOENT) |
192 | #define nfserr_io __constant_htonl(NFSERR_IO) | 194 | #define nfserr_io cpu_to_be32(NFSERR_IO) |
193 | #define nfserr_nxio __constant_htonl(NFSERR_NXIO) | 195 | #define nfserr_nxio cpu_to_be32(NFSERR_NXIO) |
194 | #define nfserr_eagain __constant_htonl(NFSERR_EAGAIN) | 196 | #define nfserr_eagain cpu_to_be32(NFSERR_EAGAIN) |
195 | #define nfserr_acces __constant_htonl(NFSERR_ACCES) | 197 | #define nfserr_acces cpu_to_be32(NFSERR_ACCES) |
196 | #define nfserr_exist __constant_htonl(NFSERR_EXIST) | 198 | #define nfserr_exist cpu_to_be32(NFSERR_EXIST) |
197 | #define nfserr_xdev __constant_htonl(NFSERR_XDEV) | 199 | #define nfserr_xdev cpu_to_be32(NFSERR_XDEV) |
198 | #define nfserr_nodev __constant_htonl(NFSERR_NODEV) | 200 | #define nfserr_nodev cpu_to_be32(NFSERR_NODEV) |
199 | #define nfserr_notdir __constant_htonl(NFSERR_NOTDIR) | 201 | #define nfserr_notdir cpu_to_be32(NFSERR_NOTDIR) |
200 | #define nfserr_isdir __constant_htonl(NFSERR_ISDIR) | 202 | #define nfserr_isdir cpu_to_be32(NFSERR_ISDIR) |
201 | #define nfserr_inval __constant_htonl(NFSERR_INVAL) | 203 | #define nfserr_inval cpu_to_be32(NFSERR_INVAL) |
202 | #define nfserr_fbig __constant_htonl(NFSERR_FBIG) | 204 | #define nfserr_fbig cpu_to_be32(NFSERR_FBIG) |
203 | #define nfserr_nospc __constant_htonl(NFSERR_NOSPC) | 205 | #define nfserr_nospc cpu_to_be32(NFSERR_NOSPC) |
204 | #define nfserr_rofs __constant_htonl(NFSERR_ROFS) | 206 | #define nfserr_rofs cpu_to_be32(NFSERR_ROFS) |
205 | #define nfserr_mlink __constant_htonl(NFSERR_MLINK) | 207 | #define nfserr_mlink cpu_to_be32(NFSERR_MLINK) |
206 | #define nfserr_opnotsupp __constant_htonl(NFSERR_OPNOTSUPP) | 208 | #define nfserr_opnotsupp cpu_to_be32(NFSERR_OPNOTSUPP) |
207 | #define nfserr_nametoolong __constant_htonl(NFSERR_NAMETOOLONG) | 209 | #define nfserr_nametoolong cpu_to_be32(NFSERR_NAMETOOLONG) |
208 | #define nfserr_notempty __constant_htonl(NFSERR_NOTEMPTY) | 210 | #define nfserr_notempty cpu_to_be32(NFSERR_NOTEMPTY) |
209 | #define nfserr_dquot __constant_htonl(NFSERR_DQUOT) | 211 | #define nfserr_dquot cpu_to_be32(NFSERR_DQUOT) |
210 | #define nfserr_stale __constant_htonl(NFSERR_STALE) | 212 | #define nfserr_stale cpu_to_be32(NFSERR_STALE) |
211 | #define nfserr_remote __constant_htonl(NFSERR_REMOTE) | 213 | #define nfserr_remote cpu_to_be32(NFSERR_REMOTE) |
212 | #define nfserr_wflush __constant_htonl(NFSERR_WFLUSH) | 214 | #define nfserr_wflush cpu_to_be32(NFSERR_WFLUSH) |
213 | #define nfserr_badhandle __constant_htonl(NFSERR_BADHANDLE) | 215 | #define nfserr_badhandle cpu_to_be32(NFSERR_BADHANDLE) |
214 | #define nfserr_notsync __constant_htonl(NFSERR_NOT_SYNC) | 216 | #define nfserr_notsync cpu_to_be32(NFSERR_NOT_SYNC) |
215 | #define nfserr_badcookie __constant_htonl(NFSERR_BAD_COOKIE) | 217 | #define nfserr_badcookie cpu_to_be32(NFSERR_BAD_COOKIE) |
216 | #define nfserr_notsupp __constant_htonl(NFSERR_NOTSUPP) | 218 | #define nfserr_notsupp cpu_to_be32(NFSERR_NOTSUPP) |
217 | #define nfserr_toosmall __constant_htonl(NFSERR_TOOSMALL) | 219 | #define nfserr_toosmall cpu_to_be32(NFSERR_TOOSMALL) |
218 | #define nfserr_serverfault __constant_htonl(NFSERR_SERVERFAULT) | 220 | #define nfserr_serverfault cpu_to_be32(NFSERR_SERVERFAULT) |
219 | #define nfserr_badtype __constant_htonl(NFSERR_BADTYPE) | 221 | #define nfserr_badtype cpu_to_be32(NFSERR_BADTYPE) |
220 | #define nfserr_jukebox __constant_htonl(NFSERR_JUKEBOX) | 222 | #define nfserr_jukebox cpu_to_be32(NFSERR_JUKEBOX) |
221 | #define nfserr_denied __constant_htonl(NFSERR_DENIED) | 223 | #define nfserr_denied cpu_to_be32(NFSERR_DENIED) |
222 | #define nfserr_deadlock __constant_htonl(NFSERR_DEADLOCK) | 224 | #define nfserr_deadlock cpu_to_be32(NFSERR_DEADLOCK) |
223 | #define nfserr_expired __constant_htonl(NFSERR_EXPIRED) | 225 | #define nfserr_expired cpu_to_be32(NFSERR_EXPIRED) |
224 | #define nfserr_bad_cookie __constant_htonl(NFSERR_BAD_COOKIE) | 226 | #define nfserr_bad_cookie cpu_to_be32(NFSERR_BAD_COOKIE) |
225 | #define nfserr_same __constant_htonl(NFSERR_SAME) | 227 | #define nfserr_same cpu_to_be32(NFSERR_SAME) |
226 | #define nfserr_clid_inuse __constant_htonl(NFSERR_CLID_INUSE) | 228 | #define nfserr_clid_inuse cpu_to_be32(NFSERR_CLID_INUSE) |
227 | #define nfserr_stale_clientid __constant_htonl(NFSERR_STALE_CLIENTID) | 229 | #define nfserr_stale_clientid cpu_to_be32(NFSERR_STALE_CLIENTID) |
228 | #define nfserr_resource __constant_htonl(NFSERR_RESOURCE) | 230 | #define nfserr_resource cpu_to_be32(NFSERR_RESOURCE) |
229 | #define nfserr_moved __constant_htonl(NFSERR_MOVED) | 231 | #define nfserr_moved cpu_to_be32(NFSERR_MOVED) |
230 | #define nfserr_nofilehandle __constant_htonl(NFSERR_NOFILEHANDLE) | 232 | #define nfserr_nofilehandle cpu_to_be32(NFSERR_NOFILEHANDLE) |
231 | #define nfserr_minor_vers_mismatch __constant_htonl(NFSERR_MINOR_VERS_MISMATCH) | 233 | #define nfserr_minor_vers_mismatch cpu_to_be32(NFSERR_MINOR_VERS_MISMATCH) |
232 | #define nfserr_share_denied __constant_htonl(NFSERR_SHARE_DENIED) | 234 | #define nfserr_share_denied cpu_to_be32(NFSERR_SHARE_DENIED) |
233 | #define nfserr_stale_stateid __constant_htonl(NFSERR_STALE_STATEID) | 235 | #define nfserr_stale_stateid cpu_to_be32(NFSERR_STALE_STATEID) |
234 | #define nfserr_old_stateid __constant_htonl(NFSERR_OLD_STATEID) | 236 | #define nfserr_old_stateid cpu_to_be32(NFSERR_OLD_STATEID) |
235 | #define nfserr_bad_stateid __constant_htonl(NFSERR_BAD_STATEID) | 237 | #define nfserr_bad_stateid cpu_to_be32(NFSERR_BAD_STATEID) |
236 | #define nfserr_bad_seqid __constant_htonl(NFSERR_BAD_SEQID) | 238 | #define nfserr_bad_seqid cpu_to_be32(NFSERR_BAD_SEQID) |
237 | #define nfserr_symlink __constant_htonl(NFSERR_SYMLINK) | 239 | #define nfserr_symlink cpu_to_be32(NFSERR_SYMLINK) |
238 | #define nfserr_not_same __constant_htonl(NFSERR_NOT_SAME) | 240 | #define nfserr_not_same cpu_to_be32(NFSERR_NOT_SAME) |
239 | #define nfserr_restorefh __constant_htonl(NFSERR_RESTOREFH) | 241 | #define nfserr_restorefh cpu_to_be32(NFSERR_RESTOREFH) |
240 | #define nfserr_attrnotsupp __constant_htonl(NFSERR_ATTRNOTSUPP) | 242 | #define nfserr_attrnotsupp cpu_to_be32(NFSERR_ATTRNOTSUPP) |
241 | #define nfserr_bad_xdr __constant_htonl(NFSERR_BAD_XDR) | 243 | #define nfserr_bad_xdr cpu_to_be32(NFSERR_BAD_XDR) |
242 | #define nfserr_openmode __constant_htonl(NFSERR_OPENMODE) | 244 | #define nfserr_openmode cpu_to_be32(NFSERR_OPENMODE) |
243 | #define nfserr_locks_held __constant_htonl(NFSERR_LOCKS_HELD) | 245 | #define nfserr_locks_held cpu_to_be32(NFSERR_LOCKS_HELD) |
244 | #define nfserr_op_illegal __constant_htonl(NFSERR_OP_ILLEGAL) | 246 | #define nfserr_op_illegal cpu_to_be32(NFSERR_OP_ILLEGAL) |
245 | #define nfserr_grace __constant_htonl(NFSERR_GRACE) | 247 | #define nfserr_grace cpu_to_be32(NFSERR_GRACE) |
246 | #define nfserr_no_grace __constant_htonl(NFSERR_NO_GRACE) | 248 | #define nfserr_no_grace cpu_to_be32(NFSERR_NO_GRACE) |
247 | #define nfserr_reclaim_bad __constant_htonl(NFSERR_RECLAIM_BAD) | 249 | #define nfserr_reclaim_bad cpu_to_be32(NFSERR_RECLAIM_BAD) |
248 | #define nfserr_badname __constant_htonl(NFSERR_BADNAME) | 250 | #define nfserr_badname cpu_to_be32(NFSERR_BADNAME) |
249 | #define nfserr_cb_path_down __constant_htonl(NFSERR_CB_PATH_DOWN) | 251 | #define nfserr_cb_path_down cpu_to_be32(NFSERR_CB_PATH_DOWN) |
250 | #define nfserr_locked __constant_htonl(NFSERR_LOCKED) | 252 | #define nfserr_locked cpu_to_be32(NFSERR_LOCKED) |
251 | #define nfserr_wrongsec __constant_htonl(NFSERR_WRONGSEC) | 253 | #define nfserr_wrongsec cpu_to_be32(NFSERR_WRONGSEC) |
252 | #define nfserr_replay_me __constant_htonl(NFSERR_REPLAY_ME) | 254 | #define nfserr_badiomode cpu_to_be32(NFS4ERR_BADIOMODE) |
255 | #define nfserr_badlayout cpu_to_be32(NFS4ERR_BADLAYOUT) | ||
256 | #define nfserr_bad_session_digest cpu_to_be32(NFS4ERR_BAD_SESSION_DIGEST) | ||
257 | #define nfserr_badsession cpu_to_be32(NFS4ERR_BADSESSION) | ||
258 | #define nfserr_badslot cpu_to_be32(NFS4ERR_BADSLOT) | ||
259 | #define nfserr_complete_already cpu_to_be32(NFS4ERR_COMPLETE_ALREADY) | ||
260 | #define nfserr_conn_not_bound_to_session cpu_to_be32(NFS4ERR_CONN_NOT_BOUND_TO_SESSION) | ||
261 | #define nfserr_deleg_already_wanted cpu_to_be32(NFS4ERR_DELEG_ALREADY_WANTED) | ||
262 | #define nfserr_back_chan_busy cpu_to_be32(NFS4ERR_BACK_CHAN_BUSY) | ||
263 | #define nfserr_layouttrylater cpu_to_be32(NFS4ERR_LAYOUTTRYLATER) | ||
264 | #define nfserr_layoutunavailable cpu_to_be32(NFS4ERR_LAYOUTUNAVAILABLE) | ||
265 | #define nfserr_nomatching_layout cpu_to_be32(NFS4ERR_NOMATCHING_LAYOUT) | ||
266 | #define nfserr_recallconflict cpu_to_be32(NFS4ERR_RECALLCONFLICT) | ||
267 | #define nfserr_unknown_layouttype cpu_to_be32(NFS4ERR_UNKNOWN_LAYOUTTYPE) | ||
268 | #define nfserr_seq_misordered cpu_to_be32(NFS4ERR_SEQ_MISORDERED) | ||
269 | #define nfserr_sequence_pos cpu_to_be32(NFS4ERR_SEQUENCE_POS) | ||
270 | #define nfserr_req_too_big cpu_to_be32(NFS4ERR_REQ_TOO_BIG) | ||
271 | #define nfserr_rep_too_big cpu_to_be32(NFS4ERR_REP_TOO_BIG) | ||
272 | #define nfserr_rep_too_big_to_cache cpu_to_be32(NFS4ERR_REP_TOO_BIG_TO_CACHE) | ||
273 | #define nfserr_retry_uncached_rep cpu_to_be32(NFS4ERR_RETRY_UNCACHED_REP) | ||
274 | #define nfserr_unsafe_compound cpu_to_be32(NFS4ERR_UNSAFE_COMPOUND) | ||
275 | #define nfserr_too_many_ops cpu_to_be32(NFS4ERR_TOO_MANY_OPS) | ||
276 | #define nfserr_op_not_in_session cpu_to_be32(NFS4ERR_OP_NOT_IN_SESSION) | ||
277 | #define nfserr_hash_alg_unsupp cpu_to_be32(NFS4ERR_HASH_ALG_UNSUPP) | ||
278 | #define nfserr_clientid_busy cpu_to_be32(NFS4ERR_CLIENTID_BUSY) | ||
279 | #define nfserr_pnfs_io_hole cpu_to_be32(NFS4ERR_PNFS_IO_HOLE) | ||
280 | #define nfserr_seq_false_retry cpu_to_be32(NFS4ERR_SEQ_FALSE_RETRY) | ||
281 | #define nfserr_bad_high_slot cpu_to_be32(NFS4ERR_BAD_HIGH_SLOT) | ||
282 | #define nfserr_deadsession cpu_to_be32(NFS4ERR_DEADSESSION) | ||
283 | #define nfserr_encr_alg_unsupp cpu_to_be32(NFS4ERR_ENCR_ALG_UNSUPP) | ||
284 | #define nfserr_pnfs_no_layout cpu_to_be32(NFS4ERR_PNFS_NO_LAYOUT) | ||
285 | #define nfserr_not_only_op cpu_to_be32(NFS4ERR_NOT_ONLY_OP) | ||
286 | #define nfserr_wrong_cred cpu_to_be32(NFS4ERR_WRONG_CRED) | ||
287 | #define nfserr_wrong_type cpu_to_be32(NFS4ERR_WRONG_TYPE) | ||
288 | #define nfserr_dirdeleg_unavail cpu_to_be32(NFS4ERR_DIRDELEG_UNAVAIL) | ||
289 | #define nfserr_reject_deleg cpu_to_be32(NFS4ERR_REJECT_DELEG) | ||
290 | #define nfserr_returnconflict cpu_to_be32(NFS4ERR_RETURNCONFLICT) | ||
291 | #define nfserr_deleg_revoked cpu_to_be32(NFS4ERR_DELEG_REVOKED) | ||
253 | 292 | ||
254 | /* error codes for internal use */ | 293 | /* error codes for internal use */ |
255 | /* if a request fails due to kmalloc failure, it gets dropped. | 294 | /* if a request fails due to kmalloc failure, it gets dropped. |
256 | * Client should resend eventually | 295 | * Client should resend eventually |
257 | */ | 296 | */ |
258 | #define nfserr_dropit __constant_htonl(30000) | 297 | #define nfserr_dropit cpu_to_be32(30000) |
259 | /* end-of-file indicator in readdir */ | 298 | /* end-of-file indicator in readdir */ |
260 | #define nfserr_eof __constant_htonl(30001) | 299 | #define nfserr_eof cpu_to_be32(30001) |
300 | /* replay detected */ | ||
301 | #define nfserr_replay_me cpu_to_be32(11001) | ||
302 | /* nfs41 replay detected */ | ||
303 | #define nfserr_replay_cache cpu_to_be32(11002) | ||
261 | 304 | ||
262 | /* Check for dir entries '.' and '..' */ | 305 | /* Check for dir entries '.' and '..' */ |
263 | #define isdotent(n, l) (l < 3 && n[0] == '.' && (l == 1 || n[1] == '.')) | 306 | #define isdotent(n, l) (l < 3 && n[0] == '.' && (l == 1 || n[1] == '.')) |
@@ -300,7 +343,7 @@ extern struct timeval nfssvc_boot; | |||
300 | * TIME_BACKUP (unlikely to be supported any time soon) | 343 | * TIME_BACKUP (unlikely to be supported any time soon) |
301 | * TIME_CREATE (unlikely to be supported any time soon) | 344 | * TIME_CREATE (unlikely to be supported any time soon) |
302 | */ | 345 | */ |
303 | #define NFSD_SUPPORTED_ATTRS_WORD0 \ | 346 | #define NFSD4_SUPPORTED_ATTRS_WORD0 \ |
304 | (FATTR4_WORD0_SUPPORTED_ATTRS | FATTR4_WORD0_TYPE | FATTR4_WORD0_FH_EXPIRE_TYPE \ | 347 | (FATTR4_WORD0_SUPPORTED_ATTRS | FATTR4_WORD0_TYPE | FATTR4_WORD0_FH_EXPIRE_TYPE \ |
305 | | FATTR4_WORD0_CHANGE | FATTR4_WORD0_SIZE | FATTR4_WORD0_LINK_SUPPORT \ | 348 | | FATTR4_WORD0_CHANGE | FATTR4_WORD0_SIZE | FATTR4_WORD0_LINK_SUPPORT \ |
306 | | FATTR4_WORD0_SYMLINK_SUPPORT | FATTR4_WORD0_NAMED_ATTR | FATTR4_WORD0_FSID \ | 349 | | FATTR4_WORD0_SYMLINK_SUPPORT | FATTR4_WORD0_NAMED_ATTR | FATTR4_WORD0_FSID \ |
@@ -312,7 +355,7 @@ extern struct timeval nfssvc_boot; | |||
312 | | FATTR4_WORD0_MAXFILESIZE | FATTR4_WORD0_MAXLINK | FATTR4_WORD0_MAXNAME \ | 355 | | FATTR4_WORD0_MAXFILESIZE | FATTR4_WORD0_MAXLINK | FATTR4_WORD0_MAXNAME \ |
313 | | FATTR4_WORD0_MAXREAD | FATTR4_WORD0_MAXWRITE | FATTR4_WORD0_ACL) | 356 | | FATTR4_WORD0_MAXREAD | FATTR4_WORD0_MAXWRITE | FATTR4_WORD0_ACL) |
314 | 357 | ||
315 | #define NFSD_SUPPORTED_ATTRS_WORD1 \ | 358 | #define NFSD4_SUPPORTED_ATTRS_WORD1 \ |
316 | (FATTR4_WORD1_MODE | FATTR4_WORD1_NO_TRUNC | FATTR4_WORD1_NUMLINKS \ | 359 | (FATTR4_WORD1_MODE | FATTR4_WORD1_NO_TRUNC | FATTR4_WORD1_NUMLINKS \ |
317 | | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP | FATTR4_WORD1_RAWDEV \ | 360 | | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP | FATTR4_WORD1_RAWDEV \ |
318 | | FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE | FATTR4_WORD1_SPACE_TOTAL \ | 361 | | FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE | FATTR4_WORD1_SPACE_TOTAL \ |
@@ -320,6 +363,35 @@ extern struct timeval nfssvc_boot; | |||
320 | | FATTR4_WORD1_TIME_DELTA | FATTR4_WORD1_TIME_METADATA \ | 363 | | FATTR4_WORD1_TIME_DELTA | FATTR4_WORD1_TIME_METADATA \ |
321 | | FATTR4_WORD1_TIME_MODIFY | FATTR4_WORD1_TIME_MODIFY_SET | FATTR4_WORD1_MOUNTED_ON_FILEID) | 364 | | FATTR4_WORD1_TIME_MODIFY | FATTR4_WORD1_TIME_MODIFY_SET | FATTR4_WORD1_MOUNTED_ON_FILEID) |
322 | 365 | ||
366 | #define NFSD4_SUPPORTED_ATTRS_WORD2 0 | ||
367 | |||
368 | #define NFSD4_1_SUPPORTED_ATTRS_WORD0 \ | ||
369 | NFSD4_SUPPORTED_ATTRS_WORD0 | ||
370 | |||
371 | #define NFSD4_1_SUPPORTED_ATTRS_WORD1 \ | ||
372 | NFSD4_SUPPORTED_ATTRS_WORD1 | ||
373 | |||
374 | #define NFSD4_1_SUPPORTED_ATTRS_WORD2 \ | ||
375 | (NFSD4_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SUPPATTR_EXCLCREAT) | ||
376 | |||
377 | static inline u32 nfsd_suppattrs0(u32 minorversion) | ||
378 | { | ||
379 | return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD0 | ||
380 | : NFSD4_SUPPORTED_ATTRS_WORD0; | ||
381 | } | ||
382 | |||
383 | static inline u32 nfsd_suppattrs1(u32 minorversion) | ||
384 | { | ||
385 | return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD1 | ||
386 | : NFSD4_SUPPORTED_ATTRS_WORD1; | ||
387 | } | ||
388 | |||
389 | static inline u32 nfsd_suppattrs2(u32 minorversion) | ||
390 | { | ||
391 | return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD2 | ||
392 | : NFSD4_SUPPORTED_ATTRS_WORD2; | ||
393 | } | ||
394 | |||
323 | /* These will return ERR_INVAL if specified in GETATTR or READDIR. */ | 395 | /* These will return ERR_INVAL if specified in GETATTR or READDIR. */ |
324 | #define NFSD_WRITEONLY_ATTRS_WORD1 \ | 396 | #define NFSD_WRITEONLY_ATTRS_WORD1 \ |
325 | (FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET) | 397 | (FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET) |
@@ -330,6 +402,19 @@ extern struct timeval nfssvc_boot; | |||
330 | #define NFSD_WRITEABLE_ATTRS_WORD1 \ | 402 | #define NFSD_WRITEABLE_ATTRS_WORD1 \ |
331 | (FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \ | 403 | (FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \ |
332 | | FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET) | 404 | | FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET) |
405 | #define NFSD_WRITEABLE_ATTRS_WORD2 0 | ||
406 | |||
407 | #define NFSD_SUPPATTR_EXCLCREAT_WORD0 \ | ||
408 | NFSD_WRITEABLE_ATTRS_WORD0 | ||
409 | /* | ||
410 | * we currently store the exclusive create verifier in the v_{a,m}time | ||
411 | * attributes so the client can't set these at create time using EXCLUSIVE4_1 | ||
412 | */ | ||
413 | #define NFSD_SUPPATTR_EXCLCREAT_WORD1 \ | ||
414 | (NFSD_WRITEABLE_ATTRS_WORD1 & \ | ||
415 | ~(FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET)) | ||
416 | #define NFSD_SUPPATTR_EXCLCREAT_WORD2 \ | ||
417 | NFSD_WRITEABLE_ATTRS_WORD2 | ||
333 | 418 | ||
334 | #endif /* CONFIG_NFSD_V4 */ | 419 | #endif /* CONFIG_NFSD_V4 */ |
335 | 420 | ||