xdr4.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. /*
  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. #ifndef _LINUX_NFSD_XDR4_H
  37. #define _LINUX_NFSD_XDR4_H
  38. #include "state.h"
  39. #include "nfsd.h"
  40. #define NFSD4_MAX_SEC_LABEL_LEN 2048
  41. #define NFSD4_MAX_TAGLEN 128
  42. #define XDR_LEN(n) (((n) + 3) & ~3)
  43. #define CURRENT_STATE_ID_FLAG (1<<0)
  44. #define SAVED_STATE_ID_FLAG (1<<1)
  45. #define SET_STATE_ID(c, f) ((c)->sid_flags |= (f))
  46. #define HAS_STATE_ID(c, f) ((c)->sid_flags & (f))
  47. #define CLEAR_STATE_ID(c, f) ((c)->sid_flags &= ~(f))
  48. struct nfsd4_compound_state {
  49. struct svc_fh current_fh;
  50. struct svc_fh save_fh;
  51. struct nfs4_stateowner *replay_owner;
  52. struct nfs4_client *clp;
  53. /* For sessions DRC */
  54. struct nfsd4_session *session;
  55. struct nfsd4_slot *slot;
  56. int data_offset;
  57. size_t iovlen;
  58. u32 minorversion;
  59. __be32 status;
  60. stateid_t current_stateid;
  61. stateid_t save_stateid;
  62. /* to indicate current and saved state id presents */
  63. u32 sid_flags;
  64. };
  65. static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs)
  66. {
  67. return cs->slot != NULL;
  68. }
  69. struct nfsd4_change_info {
  70. u32 atomic;
  71. bool change_supported;
  72. u32 before_ctime_sec;
  73. u32 before_ctime_nsec;
  74. u64 before_change;
  75. u32 after_ctime_sec;
  76. u32 after_ctime_nsec;
  77. u64 after_change;
  78. };
  79. struct nfsd4_access {
  80. u32 ac_req_access; /* request */
  81. u32 ac_supported; /* response */
  82. u32 ac_resp_access; /* response */
  83. };
  84. struct nfsd4_close {
  85. u32 cl_seqid; /* request */
  86. stateid_t cl_stateid; /* request+response */
  87. };
  88. struct nfsd4_commit {
  89. u64 co_offset; /* request */
  90. u32 co_count; /* request */
  91. nfs4_verifier co_verf; /* response */
  92. };
  93. struct nfsd4_create {
  94. u32 cr_namelen; /* request */
  95. char * cr_name; /* request */
  96. u32 cr_type; /* request */
  97. union { /* request */
  98. struct {
  99. u32 datalen;
  100. char *data;
  101. } link; /* NF4LNK */
  102. struct {
  103. u32 specdata1;
  104. u32 specdata2;
  105. } dev; /* NF4BLK, NF4CHR */
  106. } u;
  107. u32 cr_bmval[3]; /* request */
  108. struct iattr cr_iattr; /* request */
  109. struct nfsd4_change_info cr_cinfo; /* response */
  110. struct nfs4_acl *cr_acl;
  111. struct xdr_netobj cr_label;
  112. };
  113. #define cr_datalen u.link.datalen
  114. #define cr_data u.link.data
  115. #define cr_specdata1 u.dev.specdata1
  116. #define cr_specdata2 u.dev.specdata2
  117. struct nfsd4_delegreturn {
  118. stateid_t dr_stateid;
  119. };
  120. struct nfsd4_getattr {
  121. u32 ga_bmval[3]; /* request */
  122. struct svc_fh *ga_fhp; /* response */
  123. };
  124. struct nfsd4_link {
  125. u32 li_namelen; /* request */
  126. char * li_name; /* request */
  127. struct nfsd4_change_info li_cinfo; /* response */
  128. };
  129. struct nfsd4_lock_denied {
  130. clientid_t ld_clientid;
  131. struct xdr_netobj ld_owner;
  132. u64 ld_start;
  133. u64 ld_length;
  134. u32 ld_type;
  135. };
  136. struct nfsd4_lock {
  137. /* request */
  138. u32 lk_type;
  139. u32 lk_reclaim; /* boolean */
  140. u64 lk_offset;
  141. u64 lk_length;
  142. u32 lk_is_new;
  143. union {
  144. struct {
  145. u32 open_seqid;
  146. stateid_t open_stateid;
  147. u32 lock_seqid;
  148. clientid_t clientid;
  149. struct xdr_netobj owner;
  150. } new;
  151. struct {
  152. stateid_t lock_stateid;
  153. u32 lock_seqid;
  154. } old;
  155. } v;
  156. /* response */
  157. union {
  158. struct {
  159. stateid_t stateid;
  160. } ok;
  161. struct nfsd4_lock_denied denied;
  162. } u;
  163. };
  164. #define lk_new_open_seqid v.new.open_seqid
  165. #define lk_new_open_stateid v.new.open_stateid
  166. #define lk_new_lock_seqid v.new.lock_seqid
  167. #define lk_new_clientid v.new.clientid
  168. #define lk_new_owner v.new.owner
  169. #define lk_old_lock_stateid v.old.lock_stateid
  170. #define lk_old_lock_seqid v.old.lock_seqid
  171. #define lk_resp_stateid u.ok.stateid
  172. #define lk_denied u.denied
  173. struct nfsd4_lockt {
  174. u32 lt_type;
  175. clientid_t lt_clientid;
  176. struct xdr_netobj lt_owner;
  177. u64 lt_offset;
  178. u64 lt_length;
  179. struct nfsd4_lock_denied lt_denied;
  180. };
  181. struct nfsd4_locku {
  182. u32 lu_type;
  183. u32 lu_seqid;
  184. stateid_t lu_stateid;
  185. u64 lu_offset;
  186. u64 lu_length;
  187. };
  188. struct nfsd4_lookup {
  189. u32 lo_len; /* request */
  190. char * lo_name; /* request */
  191. };
  192. struct nfsd4_putfh {
  193. u32 pf_fhlen; /* request */
  194. char *pf_fhval; /* request */
  195. };
  196. struct nfsd4_open {
  197. u32 op_claim_type; /* request */
  198. struct xdr_netobj op_fname; /* request - everything but CLAIM_PREV */
  199. u32 op_delegate_type; /* request - CLAIM_PREV only */
  200. stateid_t op_delegate_stateid; /* request - response */
  201. u32 op_why_no_deleg; /* response - DELEG_NONE_EXT only */
  202. u32 op_create; /* request */
  203. u32 op_createmode; /* request */
  204. u32 op_bmval[3]; /* request */
  205. struct iattr op_iattr; /* UNCHECKED4, GUARDED4, EXCLUSIVE4_1 */
  206. nfs4_verifier op_verf __attribute__((aligned(32)));
  207. /* EXCLUSIVE4 */
  208. clientid_t op_clientid; /* request */
  209. struct xdr_netobj op_owner; /* request */
  210. u32 op_seqid; /* request */
  211. u32 op_share_access; /* request */
  212. u32 op_share_deny; /* request */
  213. u32 op_deleg_want; /* request */
  214. stateid_t op_stateid; /* response */
  215. __be32 op_xdr_error; /* see nfsd4_open_omfg() */
  216. u32 op_recall; /* recall */
  217. struct nfsd4_change_info op_cinfo; /* response */
  218. u32 op_rflags; /* response */
  219. bool op_truncate; /* used during processing */
  220. bool op_created; /* used during processing */
  221. struct nfs4_openowner *op_openowner; /* used during processing */
  222. struct nfs4_file *op_file; /* used during processing */
  223. struct nfs4_ol_stateid *op_stp; /* used during processing */
  224. struct nfs4_acl *op_acl;
  225. struct xdr_netobj op_label;
  226. };
  227. struct nfsd4_open_confirm {
  228. stateid_t oc_req_stateid /* request */;
  229. u32 oc_seqid /* request */;
  230. stateid_t oc_resp_stateid /* response */;
  231. };
  232. struct nfsd4_open_downgrade {
  233. stateid_t od_stateid;
  234. u32 od_seqid;
  235. u32 od_share_access; /* request */
  236. u32 od_deleg_want; /* request */
  237. u32 od_share_deny; /* request */
  238. };
  239. struct nfsd4_read {
  240. stateid_t rd_stateid; /* request */
  241. u64 rd_offset; /* request */
  242. u32 rd_length; /* request */
  243. int rd_vlen;
  244. struct file *rd_filp;
  245. struct svc_rqst *rd_rqstp; /* response */
  246. struct svc_fh * rd_fhp; /* response */
  247. };
  248. struct nfsd4_readdir {
  249. u64 rd_cookie; /* request */
  250. nfs4_verifier rd_verf; /* request */
  251. u32 rd_dircount; /* request */
  252. u32 rd_maxcount; /* request */
  253. u32 rd_bmval[3]; /* request */
  254. struct svc_rqst *rd_rqstp; /* response */
  255. struct svc_fh * rd_fhp; /* response */
  256. struct readdir_cd common;
  257. struct xdr_stream *xdr;
  258. int cookie_offset;
  259. };
  260. struct nfsd4_release_lockowner {
  261. clientid_t rl_clientid;
  262. struct xdr_netobj rl_owner;
  263. };
  264. struct nfsd4_readlink {
  265. struct svc_rqst *rl_rqstp; /* request */
  266. struct svc_fh * rl_fhp; /* request */
  267. };
  268. struct nfsd4_remove {
  269. u32 rm_namelen; /* request */
  270. char * rm_name; /* request */
  271. struct nfsd4_change_info rm_cinfo; /* response */
  272. };
  273. struct nfsd4_rename {
  274. u32 rn_snamelen; /* request */
  275. char * rn_sname; /* request */
  276. u32 rn_tnamelen; /* request */
  277. char * rn_tname; /* request */
  278. struct nfsd4_change_info rn_sinfo; /* response */
  279. struct nfsd4_change_info rn_tinfo; /* response */
  280. };
  281. struct nfsd4_secinfo {
  282. u32 si_namelen; /* request */
  283. char *si_name; /* request */
  284. struct svc_export *si_exp; /* response */
  285. };
  286. struct nfsd4_secinfo_no_name {
  287. u32 sin_style; /* request */
  288. struct svc_export *sin_exp; /* response */
  289. };
  290. struct nfsd4_setattr {
  291. stateid_t sa_stateid; /* request */
  292. u32 sa_bmval[3]; /* request */
  293. struct iattr sa_iattr; /* request */
  294. struct nfs4_acl *sa_acl;
  295. struct xdr_netobj sa_label;
  296. };
  297. struct nfsd4_setclientid {
  298. nfs4_verifier se_verf; /* request */
  299. struct xdr_netobj se_name;
  300. u32 se_callback_prog; /* request */
  301. u32 se_callback_netid_len; /* request */
  302. char * se_callback_netid_val; /* request */
  303. u32 se_callback_addr_len; /* request */
  304. char * se_callback_addr_val; /* request */
  305. u32 se_callback_ident; /* request */
  306. clientid_t se_clientid; /* response */
  307. nfs4_verifier se_confirm; /* response */
  308. };
  309. struct nfsd4_setclientid_confirm {
  310. clientid_t sc_clientid;
  311. nfs4_verifier sc_confirm;
  312. };
  313. struct nfsd4_saved_compoundargs {
  314. __be32 *p;
  315. __be32 *end;
  316. int pagelen;
  317. struct page **pagelist;
  318. };
  319. struct nfsd4_test_stateid_id {
  320. __be32 ts_id_status;
  321. stateid_t ts_id_stateid;
  322. struct list_head ts_id_list;
  323. };
  324. struct nfsd4_test_stateid {
  325. u32 ts_num_ids;
  326. struct list_head ts_stateid_list;
  327. };
  328. struct nfsd4_free_stateid {
  329. stateid_t fr_stateid; /* request */
  330. };
  331. /* also used for NVERIFY */
  332. struct nfsd4_verify {
  333. u32 ve_bmval[3]; /* request */
  334. u32 ve_attrlen; /* request */
  335. char * ve_attrval; /* request */
  336. };
  337. struct nfsd4_write {
  338. stateid_t wr_stateid; /* request */
  339. u64 wr_offset; /* request */
  340. u32 wr_stable_how; /* request */
  341. u32 wr_buflen; /* request */
  342. struct kvec wr_head;
  343. struct page ** wr_pagelist; /* request */
  344. u32 wr_bytes_written; /* response */
  345. u32 wr_how_written; /* response */
  346. nfs4_verifier wr_verifier; /* response */
  347. };
  348. struct nfsd4_exchange_id {
  349. nfs4_verifier verifier;
  350. struct xdr_netobj clname;
  351. u32 flags;
  352. clientid_t clientid;
  353. u32 seqid;
  354. int spa_how;
  355. };
  356. struct nfsd4_sequence {
  357. struct nfs4_sessionid sessionid; /* request/response */
  358. u32 seqid; /* request/response */
  359. u32 slotid; /* request/response */
  360. u32 maxslots; /* request/response */
  361. u32 cachethis; /* request */
  362. #if 0
  363. u32 target_maxslots; /* response */
  364. #endif /* not yet */
  365. u32 status_flags; /* response */
  366. };
  367. struct nfsd4_destroy_session {
  368. struct nfs4_sessionid sessionid;
  369. };
  370. struct nfsd4_destroy_clientid {
  371. clientid_t clientid;
  372. };
  373. struct nfsd4_reclaim_complete {
  374. u32 rca_one_fs;
  375. };
  376. struct nfsd4_seek {
  377. /* request */
  378. stateid_t seek_stateid;
  379. loff_t seek_offset;
  380. u32 seek_whence;
  381. /* response */
  382. u32 seek_eof;
  383. loff_t seek_pos;
  384. };
  385. struct nfsd4_op {
  386. int opnum;
  387. __be32 status;
  388. union {
  389. struct nfsd4_access access;
  390. struct nfsd4_close close;
  391. struct nfsd4_commit commit;
  392. struct nfsd4_create create;
  393. struct nfsd4_delegreturn delegreturn;
  394. struct nfsd4_getattr getattr;
  395. struct svc_fh * getfh;
  396. struct nfsd4_link link;
  397. struct nfsd4_lock lock;
  398. struct nfsd4_lockt lockt;
  399. struct nfsd4_locku locku;
  400. struct nfsd4_lookup lookup;
  401. struct nfsd4_verify nverify;
  402. struct nfsd4_open open;
  403. struct nfsd4_open_confirm open_confirm;
  404. struct nfsd4_open_downgrade open_downgrade;
  405. struct nfsd4_putfh putfh;
  406. struct nfsd4_read read;
  407. struct nfsd4_readdir readdir;
  408. struct nfsd4_readlink readlink;
  409. struct nfsd4_remove remove;
  410. struct nfsd4_rename rename;
  411. clientid_t renew;
  412. struct nfsd4_secinfo secinfo;
  413. struct nfsd4_setattr setattr;
  414. struct nfsd4_setclientid setclientid;
  415. struct nfsd4_setclientid_confirm setclientid_confirm;
  416. struct nfsd4_verify verify;
  417. struct nfsd4_write write;
  418. struct nfsd4_release_lockowner release_lockowner;
  419. /* NFSv4.1 */
  420. struct nfsd4_exchange_id exchange_id;
  421. struct nfsd4_backchannel_ctl backchannel_ctl;
  422. struct nfsd4_bind_conn_to_session bind_conn_to_session;
  423. struct nfsd4_create_session create_session;
  424. struct nfsd4_destroy_session destroy_session;
  425. struct nfsd4_sequence sequence;
  426. struct nfsd4_reclaim_complete reclaim_complete;
  427. struct nfsd4_test_stateid test_stateid;
  428. struct nfsd4_free_stateid free_stateid;
  429. /* NFSv4.2 */
  430. struct nfsd4_seek seek;
  431. } u;
  432. struct nfs4_replay * replay;
  433. };
  434. bool nfsd4_cache_this_op(struct nfsd4_op *);
  435. /*
  436. * Memory needed just for the duration of processing one compound:
  437. */
  438. struct svcxdr_tmpbuf {
  439. struct svcxdr_tmpbuf *next;
  440. char buf[];
  441. };
  442. struct nfsd4_compoundargs {
  443. /* scratch variables for XDR decode */
  444. __be32 * p;
  445. __be32 * end;
  446. struct page ** pagelist;
  447. int pagelen;
  448. __be32 tmp[8];
  449. __be32 * tmpp;
  450. struct svcxdr_tmpbuf *to_free;
  451. struct svc_rqst *rqstp;
  452. u32 taglen;
  453. char * tag;
  454. u32 minorversion;
  455. u32 opcnt;
  456. struct nfsd4_op *ops;
  457. struct nfsd4_op iops[8];
  458. int cachetype;
  459. };
  460. struct nfsd4_compoundres {
  461. /* scratch variables for XDR encode */
  462. struct xdr_stream xdr;
  463. struct svc_rqst * rqstp;
  464. u32 taglen;
  465. char * tag;
  466. u32 opcnt;
  467. __be32 * tagp; /* tag, opcount encode location */
  468. struct nfsd4_compound_state cstate;
  469. };
  470. static inline bool nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)
  471. {
  472. struct nfsd4_compoundargs *args = resp->rqstp->rq_argp;
  473. return resp->opcnt == 1 && args->ops[0].opnum == OP_SEQUENCE;
  474. }
  475. static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp)
  476. {
  477. return !(resp->cstate.slot->sl_flags & NFSD4_SLOT_CACHETHIS)
  478. || nfsd4_is_solo_sequence(resp);
  479. }
  480. static inline bool nfsd4_last_compound_op(struct svc_rqst *rqstp)
  481. {
  482. struct nfsd4_compoundres *resp = rqstp->rq_resp;
  483. struct nfsd4_compoundargs *argp = rqstp->rq_argp;
  484. return argp->opcnt == resp->opcnt;
  485. }
  486. int nfsd4_max_reply(struct svc_rqst *rqstp, struct nfsd4_op *op);
  487. void warn_on_nonidempotent_op(struct nfsd4_op *op);
  488. #define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs)
  489. static inline void
  490. set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp)
  491. {
  492. BUG_ON(!fhp->fh_pre_saved);
  493. cinfo->atomic = fhp->fh_post_saved;
  494. cinfo->change_supported = IS_I_VERSION(fhp->fh_dentry->d_inode);
  495. cinfo->before_change = fhp->fh_pre_change;
  496. cinfo->after_change = fhp->fh_post_change;
  497. cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec;
  498. cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec;
  499. cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec;
  500. cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec;
  501. }
  502. int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
  503. int nfs4svc_decode_compoundargs(struct svc_rqst *, __be32 *,
  504. struct nfsd4_compoundargs *);
  505. int nfs4svc_encode_compoundres(struct svc_rqst *, __be32 *,
  506. struct nfsd4_compoundres *);
  507. __be32 nfsd4_check_resp_size(struct nfsd4_compoundres *, u32);
  508. void nfsd4_encode_operation(struct nfsd4_compoundres *, struct nfsd4_op *);
  509. void nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op);
  510. __be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words,
  511. struct svc_fh *fhp, struct svc_export *exp,
  512. struct dentry *dentry,
  513. u32 *bmval, struct svc_rqst *, int ignore_crossmnt);
  514. extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp,
  515. struct nfsd4_compound_state *,
  516. struct nfsd4_setclientid *setclid);
  517. extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
  518. struct nfsd4_compound_state *,
  519. struct nfsd4_setclientid_confirm *setclientid_confirm);
  520. extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp,
  521. struct nfsd4_compound_state *, struct nfsd4_exchange_id *);
  522. extern __be32 nfsd4_backchannel_ctl(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_backchannel_ctl *);
  523. extern __be32 nfsd4_bind_conn_to_session(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_bind_conn_to_session *);
  524. extern __be32 nfsd4_create_session(struct svc_rqst *,
  525. struct nfsd4_compound_state *,
  526. struct nfsd4_create_session *);
  527. extern __be32 nfsd4_sequence(struct svc_rqst *,
  528. struct nfsd4_compound_state *,
  529. struct nfsd4_sequence *);
  530. extern void nfsd4_sequence_done(struct nfsd4_compoundres *resp);
  531. extern __be32 nfsd4_destroy_session(struct svc_rqst *,
  532. struct nfsd4_compound_state *,
  533. struct nfsd4_destroy_session *);
  534. extern __be32 nfsd4_destroy_clientid(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_destroy_clientid *);
  535. __be32 nfsd4_reclaim_complete(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_reclaim_complete *);
  536. extern __be32 nfsd4_process_open1(struct nfsd4_compound_state *,
  537. struct nfsd4_open *open, struct nfsd_net *nn);
  538. extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp,
  539. struct svc_fh *current_fh, struct nfsd4_open *open);
  540. extern void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate);
  541. extern void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate,
  542. struct nfsd4_open *open, __be32 status);
  543. extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp,
  544. struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc);
  545. extern __be32 nfsd4_close(struct svc_rqst *rqstp,
  546. struct nfsd4_compound_state *,
  547. struct nfsd4_close *close);
  548. extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp,
  549. struct nfsd4_compound_state *,
  550. struct nfsd4_open_downgrade *od);
  551. extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *,
  552. struct nfsd4_lock *lock);
  553. extern __be32 nfsd4_lockt(struct svc_rqst *rqstp,
  554. struct nfsd4_compound_state *,
  555. struct nfsd4_lockt *lockt);
  556. extern __be32 nfsd4_locku(struct svc_rqst *rqstp,
  557. struct nfsd4_compound_state *,
  558. struct nfsd4_locku *locku);
  559. extern __be32
  560. nfsd4_release_lockowner(struct svc_rqst *rqstp,
  561. struct nfsd4_compound_state *,
  562. struct nfsd4_release_lockowner *rlockowner);
  563. extern int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp);
  564. extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp,
  565. struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr);
  566. extern __be32 nfsd4_renew(struct svc_rqst *rqstp,
  567. struct nfsd4_compound_state *, clientid_t *clid);
  568. extern __be32 nfsd4_test_stateid(struct svc_rqst *rqstp,
  569. struct nfsd4_compound_state *, struct nfsd4_test_stateid *test_stateid);
  570. extern __be32 nfsd4_free_stateid(struct svc_rqst *rqstp,
  571. struct nfsd4_compound_state *, struct nfsd4_free_stateid *free_stateid);
  572. extern void nfsd4_bump_seqid(struct nfsd4_compound_state *, __be32 nfserr);
  573. #endif
  574. /*
  575. * Local variables:
  576. * c-basic-offset: 8
  577. * End:
  578. */