xdr4.h 18 KB

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