]>
Commit | Line | Data |
---|---|---|
1da177e4 | 1 | /* |
1da177e4 LT |
2 | * Server-side types for NFSv4. |
3 | * | |
4 | * Copyright (c) 2002 The Regents of the University of Michigan. | |
5 | * All rights reserved. | |
6 | * | |
7 | * Kendrick Smith <kmsmith@umich.edu> | |
8 | * Andy Adamson <andros@umich.edu> | |
9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | |
13 | * | |
14 | * 1. Redistributions of source code must retain the above copyright | |
15 | * notice, this list of conditions and the following disclaimer. | |
16 | * 2. Redistributions in binary form must reproduce the above copyright | |
17 | * notice, this list of conditions and the following disclaimer in the | |
18 | * documentation and/or other materials provided with the distribution. | |
19 | * 3. Neither the name of the University nor the names of its | |
20 | * contributors may be used to endorse or promote products derived | |
21 | * from this software without specific prior written permission. | |
22 | * | |
23 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | |
24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
26 | * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
27 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
31 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
32 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
33 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
34 | * | |
35 | */ | |
36 | ||
37 | #ifndef _LINUX_NFSD_XDR4_H | |
38 | #define _LINUX_NFSD_XDR4_H | |
39 | ||
9a74af21 BH |
40 | #include "state.h" |
41 | #include "nfsd.h" | |
1da177e4 LT |
42 | |
43 | #define NFSD4_MAX_TAGLEN 128 | |
44 | #define XDR_LEN(n) (((n) + 3) & ~3) | |
45 | ||
ca364317 | 46 | struct nfsd4_compound_state { |
e354d571 AA |
47 | struct svc_fh current_fh; |
48 | struct svc_fh save_fh; | |
49 | struct nfs4_stateowner *replay_owner; | |
b85d4c01 BH |
50 | /* For sessions DRC */ |
51 | struct nfsd4_session *session; | |
52 | struct nfsd4_slot *slot; | |
557ce264 | 53 | __be32 *datap; |
da3846a2 | 54 | size_t iovlen; |
d87a8ade | 55 | u32 minorversion; |
074fe897 | 56 | u32 status; |
8b70484c | 57 | const stateid_t *current_stateid; |
83071114 | 58 | const stateid_t *save_stateid; |
ca364317 BF |
59 | }; |
60 | ||
6668958f AA |
61 | static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs) |
62 | { | |
63 | return cs->slot != NULL; | |
64 | } | |
65 | ||
1da177e4 LT |
66 | struct nfsd4_change_info { |
67 | u32 atomic; | |
c654b8a9 | 68 | bool change_supported; |
1da177e4 LT |
69 | u32 before_ctime_sec; |
70 | u32 before_ctime_nsec; | |
c654b8a9 | 71 | u64 before_change; |
1da177e4 LT |
72 | u32 after_ctime_sec; |
73 | u32 after_ctime_nsec; | |
c654b8a9 | 74 | u64 after_change; |
1da177e4 LT |
75 | }; |
76 | ||
77 | struct nfsd4_access { | |
78 | u32 ac_req_access; /* request */ | |
79 | u32 ac_supported; /* response */ | |
80 | u32 ac_resp_access; /* response */ | |
81 | }; | |
82 | ||
83 | struct nfsd4_close { | |
84 | u32 cl_seqid; /* request */ | |
85 | stateid_t cl_stateid; /* request+response */ | |
1da177e4 LT |
86 | }; |
87 | ||
88 | struct nfsd4_commit { | |
89 | u64 co_offset; /* request */ | |
90 | u32 co_count; /* request */ | |
91 | nfs4_verifier co_verf; /* response */ | |
92 | }; | |
93 | ||
94 | struct nfsd4_create { | |
95 | u32 cr_namelen; /* request */ | |
96 | char * cr_name; /* request */ | |
97 | u32 cr_type; /* request */ | |
98 | union { /* request */ | |
99 | struct { | |
100 | u32 namelen; | |
101 | char *name; | |
102 | } link; /* NF4LNK */ | |
103 | struct { | |
104 | u32 specdata1; | |
105 | u32 specdata2; | |
106 | } dev; /* NF4BLK, NF4CHR */ | |
107 | } u; | |
7e705706 | 108 | u32 cr_bmval[3]; /* request */ |
1da177e4 LT |
109 | struct iattr cr_iattr; /* request */ |
110 | struct nfsd4_change_info cr_cinfo; /* response */ | |
111 | struct nfs4_acl *cr_acl; | |
112 | }; | |
113 | #define cr_linklen u.link.namelen | |
114 | #define cr_linkname u.link.name | |
115 | #define cr_specdata1 u.dev.specdata1 | |
116 | #define cr_specdata2 u.dev.specdata2 | |
117 | ||
118 | struct nfsd4_delegreturn { | |
119 | stateid_t dr_stateid; | |
120 | }; | |
121 | ||
122 | struct nfsd4_getattr { | |
7e705706 | 123 | u32 ga_bmval[3]; /* request */ |
1da177e4 LT |
124 | struct svc_fh *ga_fhp; /* response */ |
125 | }; | |
126 | ||
127 | struct nfsd4_link { | |
128 | u32 li_namelen; /* request */ | |
129 | char * li_name; /* request */ | |
130 | struct nfsd4_change_info li_cinfo; /* response */ | |
131 | }; | |
132 | ||
133 | struct nfsd4_lock_denied { | |
134 | clientid_t ld_clientid; | |
7c13f344 | 135 | struct xdr_netobj ld_owner; |
1da177e4 LT |
136 | u64 ld_start; |
137 | u64 ld_length; | |
138 | u32 ld_type; | |
139 | }; | |
140 | ||
141 | struct nfsd4_lock { | |
142 | /* request */ | |
143 | u32 lk_type; | |
144 | u32 lk_reclaim; /* boolean */ | |
145 | u64 lk_offset; | |
146 | u64 lk_length; | |
147 | u32 lk_is_new; | |
148 | union { | |
149 | struct { | |
150 | u32 open_seqid; | |
151 | stateid_t open_stateid; | |
152 | u32 lock_seqid; | |
153 | clientid_t clientid; | |
154 | struct xdr_netobj owner; | |
155 | } new; | |
156 | struct { | |
157 | stateid_t lock_stateid; | |
158 | u32 lock_seqid; | |
159 | } old; | |
160 | } v; | |
161 | ||
162 | /* response */ | |
163 | union { | |
164 | struct { | |
165 | stateid_t stateid; | |
166 | } ok; | |
167 | struct nfsd4_lock_denied denied; | |
168 | } u; | |
1da177e4 LT |
169 | }; |
170 | #define lk_new_open_seqid v.new.open_seqid | |
171 | #define lk_new_open_stateid v.new.open_stateid | |
172 | #define lk_new_lock_seqid v.new.lock_seqid | |
173 | #define lk_new_clientid v.new.clientid | |
174 | #define lk_new_owner v.new.owner | |
175 | #define lk_old_lock_stateid v.old.lock_stateid | |
176 | #define lk_old_lock_seqid v.old.lock_seqid | |
177 | ||
178 | #define lk_rflags u.ok.rflags | |
179 | #define lk_resp_stateid u.ok.stateid | |
180 | #define lk_denied u.denied | |
181 | ||
182 | ||
183 | struct nfsd4_lockt { | |
184 | u32 lt_type; | |
185 | clientid_t lt_clientid; | |
186 | struct xdr_netobj lt_owner; | |
187 | u64 lt_offset; | |
188 | u64 lt_length; | |
1da177e4 LT |
189 | struct nfsd4_lock_denied lt_denied; |
190 | }; | |
191 | ||
192 | ||
193 | struct nfsd4_locku { | |
194 | u32 lu_type; | |
195 | u32 lu_seqid; | |
196 | stateid_t lu_stateid; | |
197 | u64 lu_offset; | |
198 | u64 lu_length; | |
1da177e4 LT |
199 | }; |
200 | ||
201 | ||
202 | struct nfsd4_lookup { | |
203 | u32 lo_len; /* request */ | |
204 | char * lo_name; /* request */ | |
205 | }; | |
206 | ||
207 | struct nfsd4_putfh { | |
208 | u32 pf_fhlen; /* request */ | |
209 | char *pf_fhval; /* request */ | |
210 | }; | |
211 | ||
212 | struct nfsd4_open { | |
213 | u32 op_claim_type; /* request */ | |
214 | struct xdr_netobj op_fname; /* request - everything but CLAIM_PREV */ | |
215 | u32 op_delegate_type; /* request - CLAIM_PREV only */ | |
216 | stateid_t op_delegate_stateid; /* request - response */ | |
217 | u32 op_create; /* request */ | |
218 | u32 op_createmode; /* request */ | |
7e705706 | 219 | u32 op_bmval[3]; /* request */ |
79fb54ab BH |
220 | struct iattr iattr; /* UNCHECKED4, GUARDED4, EXCLUSIVE4_1 */ |
221 | nfs4_verifier verf; /* EXCLUSIVE4 */ | |
1da177e4 LT |
222 | clientid_t op_clientid; /* request */ |
223 | struct xdr_netobj op_owner; /* request */ | |
224 | u32 op_seqid; /* request */ | |
225 | u32 op_share_access; /* request */ | |
226 | u32 op_share_deny; /* request */ | |
227 | stateid_t op_stateid; /* response */ | |
7b190fec | 228 | u32 op_recall; /* recall */ |
1da177e4 LT |
229 | struct nfsd4_change_info op_cinfo; /* response */ |
230 | u32 op_rflags; /* response */ | |
856121b2 BF |
231 | bool op_truncate; /* used during processing */ |
232 | bool op_created; /* used during processing */ | |
fe0750e5 | 233 | struct nfs4_openowner *op_openowner; /* used during processing */ |
32513b40 | 234 | struct nfs4_file *op_file; /* used during processing */ |
4cdc951b | 235 | struct nfs4_ol_stateid *op_stp; /* used during processing */ |
1da177e4 LT |
236 | struct nfs4_acl *op_acl; |
237 | }; | |
79fb54ab BH |
238 | #define op_iattr iattr |
239 | #define op_verf verf | |
1da177e4 LT |
240 | |
241 | struct nfsd4_open_confirm { | |
242 | stateid_t oc_req_stateid /* request */; | |
243 | u32 oc_seqid /* request */; | |
244 | stateid_t oc_resp_stateid /* response */; | |
1da177e4 LT |
245 | }; |
246 | ||
247 | struct nfsd4_open_downgrade { | |
248 | stateid_t od_stateid; | |
249 | u32 od_seqid; | |
250 | u32 od_share_access; | |
251 | u32 od_share_deny; | |
1da177e4 LT |
252 | }; |
253 | ||
254 | ||
255 | struct nfsd4_read { | |
256 | stateid_t rd_stateid; /* request */ | |
257 | u64 rd_offset; /* request */ | |
258 | u32 rd_length; /* request */ | |
1da177e4 LT |
259 | int rd_vlen; |
260 | struct file *rd_filp; | |
261 | ||
262 | struct svc_rqst *rd_rqstp; /* response */ | |
263 | struct svc_fh * rd_fhp; /* response */ | |
264 | }; | |
265 | ||
266 | struct nfsd4_readdir { | |
267 | u64 rd_cookie; /* request */ | |
268 | nfs4_verifier rd_verf; /* request */ | |
269 | u32 rd_dircount; /* request */ | |
270 | u32 rd_maxcount; /* request */ | |
7e705706 | 271 | u32 rd_bmval[3]; /* request */ |
1da177e4 LT |
272 | struct svc_rqst *rd_rqstp; /* response */ |
273 | struct svc_fh * rd_fhp; /* response */ | |
274 | ||
275 | struct readdir_cd common; | |
2ebbc012 | 276 | __be32 * buffer; |
1da177e4 | 277 | int buflen; |
2ebbc012 | 278 | __be32 * offset; |
1da177e4 LT |
279 | }; |
280 | ||
281 | struct nfsd4_release_lockowner { | |
282 | clientid_t rl_clientid; | |
283 | struct xdr_netobj rl_owner; | |
284 | }; | |
285 | struct nfsd4_readlink { | |
286 | struct svc_rqst *rl_rqstp; /* request */ | |
287 | struct svc_fh * rl_fhp; /* request */ | |
288 | }; | |
289 | ||
290 | struct nfsd4_remove { | |
291 | u32 rm_namelen; /* request */ | |
292 | char * rm_name; /* request */ | |
293 | struct nfsd4_change_info rm_cinfo; /* response */ | |
294 | }; | |
295 | ||
296 | struct nfsd4_rename { | |
297 | u32 rn_snamelen; /* request */ | |
298 | char * rn_sname; /* request */ | |
299 | u32 rn_tnamelen; /* request */ | |
300 | char * rn_tname; /* request */ | |
301 | struct nfsd4_change_info rn_sinfo; /* response */ | |
302 | struct nfsd4_change_info rn_tinfo; /* response */ | |
303 | }; | |
304 | ||
dcb488a3 AA |
305 | struct nfsd4_secinfo { |
306 | u32 si_namelen; /* request */ | |
307 | char *si_name; /* request */ | |
308 | struct svc_export *si_exp; /* response */ | |
309 | }; | |
310 | ||
04f4ad16 BF |
311 | struct nfsd4_secinfo_no_name { |
312 | u32 sin_style; /* request */ | |
313 | struct svc_export *sin_exp; /* response */ | |
314 | }; | |
315 | ||
1da177e4 LT |
316 | struct nfsd4_setattr { |
317 | stateid_t sa_stateid; /* request */ | |
7e705706 | 318 | u32 sa_bmval[3]; /* request */ |
1da177e4 LT |
319 | struct iattr sa_iattr; /* request */ |
320 | struct nfs4_acl *sa_acl; | |
321 | }; | |
322 | ||
323 | struct nfsd4_setclientid { | |
324 | nfs4_verifier se_verf; /* request */ | |
a084daf5 | 325 | struct xdr_netobj se_name; |
1da177e4 LT |
326 | u32 se_callback_prog; /* request */ |
327 | u32 se_callback_netid_len; /* request */ | |
328 | char * se_callback_netid_val; /* request */ | |
329 | u32 se_callback_addr_len; /* request */ | |
330 | char * se_callback_addr_val; /* request */ | |
331 | u32 se_callback_ident; /* request */ | |
332 | clientid_t se_clientid; /* response */ | |
333 | nfs4_verifier se_confirm; /* response */ | |
334 | }; | |
335 | ||
336 | struct nfsd4_setclientid_confirm { | |
337 | clientid_t sc_clientid; | |
338 | nfs4_verifier sc_confirm; | |
339 | }; | |
340 | ||
17456804 BS |
341 | struct nfsd4_saved_compoundargs { |
342 | __be32 *p; | |
343 | __be32 *end; | |
344 | int pagelen; | |
345 | struct page **pagelist; | |
346 | }; | |
347 | ||
348 | struct nfsd4_test_stateid { | |
349 | __be32 ts_num_ids; | |
17456804 BS |
350 | struct nfsd4_compoundargs *ts_saved_args; |
351 | struct nfsd4_saved_compoundargs ts_savedp; | |
352 | }; | |
353 | ||
e1ca12df BS |
354 | struct nfsd4_free_stateid { |
355 | stateid_t fr_stateid; /* request */ | |
356 | __be32 fr_status; /* response */ | |
357 | }; | |
358 | ||
1da177e4 LT |
359 | /* also used for NVERIFY */ |
360 | struct nfsd4_verify { | |
7e705706 | 361 | u32 ve_bmval[3]; /* request */ |
1da177e4 LT |
362 | u32 ve_attrlen; /* request */ |
363 | char * ve_attrval; /* request */ | |
364 | }; | |
365 | ||
366 | struct nfsd4_write { | |
367 | stateid_t wr_stateid; /* request */ | |
368 | u64 wr_offset; /* request */ | |
369 | u32 wr_stable_how; /* request */ | |
370 | u32 wr_buflen; /* request */ | |
1da177e4 LT |
371 | int wr_vlen; |
372 | ||
373 | u32 wr_bytes_written; /* response */ | |
374 | u32 wr_how_written; /* response */ | |
375 | nfs4_verifier wr_verifier; /* response */ | |
376 | }; | |
377 | ||
2db134eb | 378 | struct nfsd4_exchange_id { |
0733d213 AA |
379 | nfs4_verifier verifier; |
380 | struct xdr_netobj clname; | |
381 | u32 flags; | |
382 | clientid_t clientid; | |
383 | u32 seqid; | |
384 | int spa_how; | |
2db134eb AA |
385 | }; |
386 | ||
2db134eb | 387 | struct nfsd4_sequence { |
b85d4c01 BH |
388 | struct nfs4_sessionid sessionid; /* request/response */ |
389 | u32 seqid; /* request/response */ | |
390 | u32 slotid; /* request/response */ | |
391 | u32 maxslots; /* request/response */ | |
392 | u32 cachethis; /* request */ | |
393 | #if 0 | |
394 | u32 target_maxslots; /* response */ | |
b85d4c01 | 395 | #endif /* not yet */ |
0d7bb719 | 396 | u32 status_flags; /* response */ |
2db134eb AA |
397 | }; |
398 | ||
399 | struct nfsd4_destroy_session { | |
e10e0cfc | 400 | struct nfs4_sessionid sessionid; |
2db134eb AA |
401 | }; |
402 | ||
345c2842 MJ |
403 | struct nfsd4_destroy_clientid { |
404 | clientid_t clientid; | |
405 | }; | |
406 | ||
4dc6ec00 BF |
407 | struct nfsd4_reclaim_complete { |
408 | u32 rca_one_fs; | |
409 | }; | |
410 | ||
1da177e4 LT |
411 | struct nfsd4_op { |
412 | int opnum; | |
b37ad28b | 413 | __be32 status; |
1da177e4 LT |
414 | union { |
415 | struct nfsd4_access access; | |
416 | struct nfsd4_close close; | |
417 | struct nfsd4_commit commit; | |
418 | struct nfsd4_create create; | |
419 | struct nfsd4_delegreturn delegreturn; | |
420 | struct nfsd4_getattr getattr; | |
421 | struct svc_fh * getfh; | |
422 | struct nfsd4_link link; | |
423 | struct nfsd4_lock lock; | |
424 | struct nfsd4_lockt lockt; | |
425 | struct nfsd4_locku locku; | |
426 | struct nfsd4_lookup lookup; | |
427 | struct nfsd4_verify nverify; | |
428 | struct nfsd4_open open; | |
429 | struct nfsd4_open_confirm open_confirm; | |
430 | struct nfsd4_open_downgrade open_downgrade; | |
431 | struct nfsd4_putfh putfh; | |
432 | struct nfsd4_read read; | |
433 | struct nfsd4_readdir readdir; | |
434 | struct nfsd4_readlink readlink; | |
435 | struct nfsd4_remove remove; | |
436 | struct nfsd4_rename rename; | |
437 | clientid_t renew; | |
dcb488a3 | 438 | struct nfsd4_secinfo secinfo; |
1da177e4 LT |
439 | struct nfsd4_setattr setattr; |
440 | struct nfsd4_setclientid setclientid; | |
441 | struct nfsd4_setclientid_confirm setclientid_confirm; | |
442 | struct nfsd4_verify verify; | |
443 | struct nfsd4_write write; | |
444 | struct nfsd4_release_lockowner release_lockowner; | |
2db134eb AA |
445 | |
446 | /* NFSv4.1 */ | |
447 | struct nfsd4_exchange_id exchange_id; | |
1d1bc8f2 | 448 | struct nfsd4_bind_conn_to_session bind_conn_to_session; |
2db134eb AA |
449 | struct nfsd4_create_session create_session; |
450 | struct nfsd4_destroy_session destroy_session; | |
451 | struct nfsd4_sequence sequence; | |
4dc6ec00 | 452 | struct nfsd4_reclaim_complete reclaim_complete; |
17456804 | 453 | struct nfsd4_test_stateid test_stateid; |
e1ca12df | 454 | struct nfsd4_free_stateid free_stateid; |
1da177e4 LT |
455 | } u; |
456 | struct nfs4_replay * replay; | |
457 | }; | |
458 | ||
1091006c BF |
459 | bool nfsd4_cache_this_op(struct nfsd4_op *); |
460 | ||
1da177e4 LT |
461 | struct nfsd4_compoundargs { |
462 | /* scratch variables for XDR decode */ | |
2ebbc012 AV |
463 | __be32 * p; |
464 | __be32 * end; | |
1da177e4 LT |
465 | struct page ** pagelist; |
466 | int pagelen; | |
2ebbc012 AV |
467 | __be32 tmp[8]; |
468 | __be32 * tmpp; | |
1da177e4 LT |
469 | struct tmpbuf { |
470 | struct tmpbuf *next; | |
471 | void (*release)(const void *); | |
472 | void *buf; | |
473 | } *to_free; | |
474 | ||
475 | struct svc_rqst *rqstp; | |
476 | ||
477 | u32 taglen; | |
478 | char * tag; | |
479 | u32 minorversion; | |
480 | u32 opcnt; | |
481 | struct nfsd4_op *ops; | |
482 | struct nfsd4_op iops[8]; | |
1091006c | 483 | int cachetype; |
1da177e4 LT |
484 | }; |
485 | ||
486 | struct nfsd4_compoundres { | |
487 | /* scratch variables for XDR encode */ | |
2ebbc012 AV |
488 | __be32 * p; |
489 | __be32 * end; | |
1da177e4 LT |
490 | struct xdr_buf * xbuf; |
491 | struct svc_rqst * rqstp; | |
492 | ||
493 | u32 taglen; | |
494 | char * tag; | |
495 | u32 opcnt; | |
e354d571 AA |
496 | __be32 * tagp; /* tag, opcount encode location */ |
497 | struct nfsd4_compound_state cstate; | |
1da177e4 LT |
498 | }; |
499 | ||
bf864a31 AA |
500 | static inline bool nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp) |
501 | { | |
502 | struct nfsd4_compoundargs *args = resp->rqstp->rq_argp; | |
468de9e5 | 503 | return resp->opcnt == 1 && args->ops[0].opnum == OP_SEQUENCE; |
bf864a31 AA |
504 | } |
505 | ||
506 | static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp) | |
507 | { | |
73e79482 BF |
508 | return !(resp->cstate.slot->sl_flags & NFSD4_SLOT_CACHETHIS) |
509 | || nfsd4_is_solo_sequence(resp); | |
bf864a31 AA |
510 | } |
511 | ||
1da177e4 LT |
512 | #define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs) |
513 | ||
514 | static inline void | |
515 | set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp) | |
516 | { | |
c1ac3ffc NB |
517 | BUG_ON(!fhp->fh_pre_saved); |
518 | cinfo->atomic = fhp->fh_post_saved; | |
c654b8a9 | 519 | cinfo->change_supported = IS_I_VERSION(fhp->fh_dentry->d_inode); |
c1ac3ffc NB |
520 | |
521 | cinfo->before_change = fhp->fh_pre_change; | |
522 | cinfo->after_change = fhp->fh_post_change; | |
523 | cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec; | |
524 | cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec; | |
525 | cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec; | |
526 | cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec; | |
527 | ||
1da177e4 LT |
528 | } |
529 | ||
2ebbc012 AV |
530 | int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *); |
531 | int nfs4svc_decode_compoundargs(struct svc_rqst *, __be32 *, | |
1da177e4 | 532 | struct nfsd4_compoundargs *); |
2ebbc012 | 533 | int nfs4svc_encode_compoundres(struct svc_rqst *, __be32 *, |
1da177e4 | 534 | struct nfsd4_compoundres *); |
58e7b33a | 535 | int nfsd4_check_resp_size(struct nfsd4_compoundres *, u32); |
1da177e4 LT |
536 | void nfsd4_encode_operation(struct nfsd4_compoundres *, struct nfsd4_op *); |
537 | void nfsd4_encode_replay(struct nfsd4_compoundres *resp, struct nfsd4_op *op); | |
b37ad28b AV |
538 | __be32 nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, |
539 | struct dentry *dentry, __be32 *buffer, int *countp, | |
406a7ea9 | 540 | u32 *bmval, struct svc_rqst *, int ignore_crossmnt); |
b37ad28b | 541 | extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp, |
b591480b | 542 | struct nfsd4_compound_state *, |
1da177e4 | 543 | struct nfsd4_setclientid *setclid); |
b37ad28b | 544 | extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp, |
b591480b | 545 | struct nfsd4_compound_state *, |
1da177e4 | 546 | struct nfsd4_setclientid_confirm *setclientid_confirm); |
074fe897 | 547 | extern void nfsd4_store_cache_entry(struct nfsd4_compoundres *resp); |
bf864a31 AA |
548 | extern __be32 nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp, |
549 | struct nfsd4_sequence *seq); | |
069b6ad4 | 550 | extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp, |
3c4ab2aa | 551 | struct nfsd4_compound_state *, struct nfsd4_exchange_id *); |
1d1bc8f2 | 552 | extern __be32 nfsd4_bind_conn_to_session(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_bind_conn_to_session *); |
3c4ab2aa | 553 | extern __be32 nfsd4_create_session(struct svc_rqst *, |
069b6ad4 AA |
554 | struct nfsd4_compound_state *, |
555 | struct nfsd4_create_session *); | |
556 | extern __be32 nfsd4_sequence(struct svc_rqst *, | |
557 | struct nfsd4_compound_state *, | |
558 | struct nfsd4_sequence *); | |
559 | extern __be32 nfsd4_destroy_session(struct svc_rqst *, | |
560 | struct nfsd4_compound_state *, | |
561 | struct nfsd4_destroy_session *); | |
345c2842 | 562 | extern __be32 nfsd4_destroy_clientid(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_destroy_clientid *); |
4dc6ec00 | 563 | __be32 nfsd4_reclaim_complete(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_reclaim_complete *); |
6668958f AA |
564 | extern __be32 nfsd4_process_open1(struct nfsd4_compound_state *, |
565 | struct nfsd4_open *open); | |
b37ad28b | 566 | extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp, |
1da177e4 | 567 | struct svc_fh *current_fh, struct nfsd4_open *open); |
d29b20cd | 568 | extern void nfsd4_cleanup_open_state(struct nfsd4_open *open, __be32 status); |
b37ad28b | 569 | extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp, |
a4f1706a | 570 | struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc); |
ca364317 BF |
571 | extern __be32 nfsd4_close(struct svc_rqst *rqstp, |
572 | struct nfsd4_compound_state *, | |
a4f1706a | 573 | struct nfsd4_close *close); |
b37ad28b | 574 | extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp, |
a4f1706a BF |
575 | struct nfsd4_compound_state *, |
576 | struct nfsd4_open_downgrade *od); | |
ca364317 | 577 | extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *, |
a4f1706a | 578 | struct nfsd4_lock *lock); |
ca364317 BF |
579 | extern __be32 nfsd4_lockt(struct svc_rqst *rqstp, |
580 | struct nfsd4_compound_state *, | |
1da177e4 | 581 | struct nfsd4_lockt *lockt); |
ca364317 BF |
582 | extern __be32 nfsd4_locku(struct svc_rqst *rqstp, |
583 | struct nfsd4_compound_state *, | |
a4f1706a | 584 | struct nfsd4_locku *locku); |
b37ad28b | 585 | extern __be32 |
1da177e4 | 586 | nfsd4_release_lockowner(struct svc_rqst *rqstp, |
b591480b | 587 | struct nfsd4_compound_state *, |
1da177e4 | 588 | struct nfsd4_release_lockowner *rlockowner); |
3e98abff | 589 | extern int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp); |
b37ad28b | 590 | extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp, |
ca364317 | 591 | struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr); |
b591480b BF |
592 | extern __be32 nfsd4_renew(struct svc_rqst *rqstp, |
593 | struct nfsd4_compound_state *, clientid_t *clid); | |
17456804 BS |
594 | extern __be32 nfsd4_test_stateid(struct svc_rqst *rqstp, |
595 | struct nfsd4_compound_state *, struct nfsd4_test_stateid *test_stateid); | |
e1ca12df BS |
596 | extern __be32 nfsd4_free_stateid(struct svc_rqst *rqstp, |
597 | struct nfsd4_compound_state *, struct nfsd4_free_stateid *free_stateid); | |
1da177e4 LT |
598 | #endif |
599 | ||
600 | /* | |
601 | * Local variables: | |
602 | * c-basic-offset: 8 | |
603 | * End: | |
604 | */ |