nfs_xdr.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. #ifndef _LINUX_NFS_XDR_H
  2. #define _LINUX_NFS_XDR_H
  3. #include <linux/sunrpc/xprt.h>
  4. #include <linux/nfsacl.h>
  5. struct nfs4_fsid {
  6. __u64 major;
  7. __u64 minor;
  8. };
  9. struct nfs_fattr {
  10. unsigned short valid; /* which fields are valid */
  11. __u64 pre_size; /* pre_op_attr.size */
  12. struct timespec pre_mtime; /* pre_op_attr.mtime */
  13. struct timespec pre_ctime; /* pre_op_attr.ctime */
  14. enum nfs_ftype type; /* always use NFSv2 types */
  15. __u32 mode;
  16. __u32 nlink;
  17. __u32 uid;
  18. __u32 gid;
  19. __u64 size;
  20. union {
  21. struct {
  22. __u32 blocksize;
  23. __u32 blocks;
  24. } nfs2;
  25. struct {
  26. __u64 used;
  27. } nfs3;
  28. } du;
  29. dev_t rdev;
  30. union {
  31. __u64 nfs3; /* also nfs2 */
  32. struct nfs4_fsid nfs4;
  33. } fsid_u;
  34. __u64 fileid;
  35. struct timespec atime;
  36. struct timespec mtime;
  37. struct timespec ctime;
  38. __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */
  39. __u64 change_attr; /* NFSv4 change attribute */
  40. __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
  41. unsigned long time_start;
  42. };
  43. #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */
  44. #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */
  45. #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */
  46. #define NFS_ATTR_FATTR_V4 0x0008
  47. #define NFS_ATTR_PRE_CHANGE 0x0010
  48. /*
  49. * Info on the file system
  50. */
  51. struct nfs_fsinfo {
  52. struct nfs_fattr *fattr; /* Post-op attributes */
  53. __u32 rtmax; /* max. read transfer size */
  54. __u32 rtpref; /* pref. read transfer size */
  55. __u32 rtmult; /* reads should be multiple of this */
  56. __u32 wtmax; /* max. write transfer size */
  57. __u32 wtpref; /* pref. write transfer size */
  58. __u32 wtmult; /* writes should be multiple of this */
  59. __u32 dtpref; /* pref. readdir transfer size */
  60. __u64 maxfilesize;
  61. __u32 lease_time; /* in seconds */
  62. };
  63. struct nfs_fsstat {
  64. struct nfs_fattr *fattr; /* Post-op attributes */
  65. __u64 tbytes; /* total size in bytes */
  66. __u64 fbytes; /* # of free bytes */
  67. __u64 abytes; /* # of bytes available to user */
  68. __u64 tfiles; /* # of files */
  69. __u64 ffiles; /* # of free files */
  70. __u64 afiles; /* # of files available to user */
  71. };
  72. struct nfs2_fsstat {
  73. __u32 tsize; /* Server transfer size */
  74. __u32 bsize; /* Filesystem block size */
  75. __u32 blocks; /* No. of "bsize" blocks on filesystem */
  76. __u32 bfree; /* No. of free "bsize" blocks */
  77. __u32 bavail; /* No. of available "bsize" blocks */
  78. };
  79. struct nfs_pathconf {
  80. struct nfs_fattr *fattr; /* Post-op attributes */
  81. __u32 max_link; /* max # of hard links */
  82. __u32 max_namelen; /* max name length */
  83. };
  84. struct nfs4_change_info {
  85. u32 atomic;
  86. u64 before;
  87. u64 after;
  88. };
  89. struct nfs_seqid;
  90. /*
  91. * Arguments to the open call.
  92. */
  93. struct nfs_openargs {
  94. const struct nfs_fh * fh;
  95. struct nfs_seqid * seqid;
  96. int open_flags;
  97. __u64 clientid;
  98. __u32 id;
  99. union {
  100. struct iattr * attrs; /* UNCHECKED, GUARDED */
  101. nfs4_verifier verifier; /* EXCLUSIVE */
  102. nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
  103. int delegation_type; /* CLAIM_PREVIOUS */
  104. } u;
  105. const struct qstr * name;
  106. const struct nfs_server *server; /* Needed for ID mapping */
  107. const u32 * bitmask;
  108. __u32 claim;
  109. };
  110. struct nfs_openres {
  111. nfs4_stateid stateid;
  112. struct nfs_fh fh;
  113. struct nfs4_change_info cinfo;
  114. __u32 rflags;
  115. struct nfs_fattr * f_attr;
  116. struct nfs_fattr * dir_attr;
  117. const struct nfs_server *server;
  118. int delegation_type;
  119. nfs4_stateid delegation;
  120. __u32 do_recall;
  121. __u64 maxsize;
  122. };
  123. /*
  124. * Arguments to the open_confirm call.
  125. */
  126. struct nfs_open_confirmargs {
  127. const struct nfs_fh * fh;
  128. nfs4_stateid stateid;
  129. struct nfs_seqid * seqid;
  130. };
  131. struct nfs_open_confirmres {
  132. nfs4_stateid stateid;
  133. };
  134. /*
  135. * Arguments to the close call.
  136. */
  137. struct nfs_closeargs {
  138. struct nfs_fh * fh;
  139. nfs4_stateid * stateid;
  140. struct nfs_seqid * seqid;
  141. int open_flags;
  142. const u32 * bitmask;
  143. };
  144. struct nfs_closeres {
  145. nfs4_stateid stateid;
  146. struct nfs_fattr * fattr;
  147. const struct nfs_server *server;
  148. };
  149. /*
  150. * * Arguments to the lock,lockt, and locku call.
  151. * */
  152. struct nfs_lowner {
  153. __u64 clientid;
  154. u32 id;
  155. };
  156. struct nfs_lock_opargs {
  157. struct nfs_seqid * lock_seqid;
  158. nfs4_stateid * lock_stateid;
  159. struct nfs_seqid * open_seqid;
  160. nfs4_stateid * open_stateid;
  161. struct nfs_lowner lock_owner;
  162. __u32 reclaim;
  163. __u32 new_lock_owner;
  164. };
  165. struct nfs_locku_opargs {
  166. struct nfs_seqid * seqid;
  167. nfs4_stateid * stateid;
  168. };
  169. struct nfs_lockargs {
  170. struct nfs_fh * fh;
  171. __u32 type;
  172. __u64 offset;
  173. __u64 length;
  174. union {
  175. struct nfs_lock_opargs *lock; /* LOCK */
  176. struct nfs_lowner *lockt; /* LOCKT */
  177. struct nfs_locku_opargs *locku; /* LOCKU */
  178. } u;
  179. };
  180. struct nfs_lock_denied {
  181. __u64 offset;
  182. __u64 length;
  183. __u32 type;
  184. struct nfs_lowner owner;
  185. };
  186. struct nfs_lockres {
  187. union {
  188. nfs4_stateid stateid;/* LOCK success, LOCKU */
  189. struct nfs_lock_denied denied; /* LOCK failed, LOCKT success */
  190. } u;
  191. const struct nfs_server * server;
  192. };
  193. struct nfs4_delegreturnargs {
  194. const struct nfs_fh *fhandle;
  195. const nfs4_stateid *stateid;
  196. };
  197. /*
  198. * Arguments to the read call.
  199. */
  200. #define NFS_READ_MAXIOV (9U)
  201. #if (NFS_READ_MAXIOV > (MAX_IOVEC -2))
  202. #error "NFS_READ_MAXIOV is too large"
  203. #endif
  204. struct nfs_readargs {
  205. struct nfs_fh * fh;
  206. struct nfs_open_context *context;
  207. __u64 offset;
  208. __u32 count;
  209. unsigned int pgbase;
  210. struct page ** pages;
  211. };
  212. struct nfs_readres {
  213. struct nfs_fattr * fattr;
  214. __u32 count;
  215. int eof;
  216. };
  217. /*
  218. * Arguments to the write call.
  219. */
  220. #define NFS_WRITE_MAXIOV (9U)
  221. #if (NFS_WRITE_MAXIOV > (MAX_IOVEC -2))
  222. #error "NFS_WRITE_MAXIOV is too large"
  223. #endif
  224. struct nfs_writeargs {
  225. struct nfs_fh * fh;
  226. struct nfs_open_context *context;
  227. __u64 offset;
  228. __u32 count;
  229. enum nfs3_stable_how stable;
  230. unsigned int pgbase;
  231. struct page ** pages;
  232. const u32 * bitmask;
  233. };
  234. struct nfs_writeverf {
  235. enum nfs3_stable_how committed;
  236. __u32 verifier[2];
  237. };
  238. struct nfs_writeres {
  239. struct nfs_fattr * fattr;
  240. struct nfs_writeverf * verf;
  241. __u32 count;
  242. const struct nfs_server *server;
  243. };
  244. /*
  245. * Argument struct for decode_entry function
  246. */
  247. struct nfs_entry {
  248. __u64 ino;
  249. __u64 cookie,
  250. prev_cookie;
  251. const char * name;
  252. unsigned int len;
  253. int eof;
  254. struct nfs_fh * fh;
  255. struct nfs_fattr * fattr;
  256. };
  257. /*
  258. * The following types are for NFSv2 only.
  259. */
  260. struct nfs_sattrargs {
  261. struct nfs_fh * fh;
  262. struct iattr * sattr;
  263. };
  264. struct nfs_diropargs {
  265. struct nfs_fh * fh;
  266. const char * name;
  267. unsigned int len;
  268. };
  269. struct nfs_createargs {
  270. struct nfs_fh * fh;
  271. const char * name;
  272. unsigned int len;
  273. struct iattr * sattr;
  274. };
  275. struct nfs_renameargs {
  276. struct nfs_fh * fromfh;
  277. const char * fromname;
  278. unsigned int fromlen;
  279. struct nfs_fh * tofh;
  280. const char * toname;
  281. unsigned int tolen;
  282. };
  283. struct nfs_setattrargs {
  284. struct nfs_fh * fh;
  285. nfs4_stateid stateid;
  286. struct iattr * iap;
  287. const struct nfs_server * server; /* Needed for name mapping */
  288. const u32 * bitmask;
  289. };
  290. struct nfs_setaclargs {
  291. struct nfs_fh * fh;
  292. size_t acl_len;
  293. unsigned int acl_pgbase;
  294. struct page ** acl_pages;
  295. };
  296. struct nfs_getaclargs {
  297. struct nfs_fh * fh;
  298. size_t acl_len;
  299. unsigned int acl_pgbase;
  300. struct page ** acl_pages;
  301. };
  302. struct nfs_setattrres {
  303. struct nfs_fattr * fattr;
  304. const struct nfs_server * server;
  305. };
  306. struct nfs_linkargs {
  307. struct nfs_fh * fromfh;
  308. struct nfs_fh * tofh;
  309. const char * toname;
  310. unsigned int tolen;
  311. };
  312. struct nfs_symlinkargs {
  313. struct nfs_fh * fromfh;
  314. const char * fromname;
  315. unsigned int fromlen;
  316. const char * topath;
  317. unsigned int tolen;
  318. struct iattr * sattr;
  319. };
  320. struct nfs_readdirargs {
  321. struct nfs_fh * fh;
  322. __u32 cookie;
  323. unsigned int count;
  324. struct page ** pages;
  325. };
  326. struct nfs3_getaclargs {
  327. struct nfs_fh * fh;
  328. int mask;
  329. struct page ** pages;
  330. };
  331. struct nfs3_setaclargs {
  332. struct inode * inode;
  333. int mask;
  334. struct posix_acl * acl_access;
  335. struct posix_acl * acl_default;
  336. struct page ** pages;
  337. };
  338. struct nfs_diropok {
  339. struct nfs_fh * fh;
  340. struct nfs_fattr * fattr;
  341. };
  342. struct nfs_readlinkargs {
  343. struct nfs_fh * fh;
  344. unsigned int pgbase;
  345. unsigned int pglen;
  346. struct page ** pages;
  347. };
  348. struct nfs3_sattrargs {
  349. struct nfs_fh * fh;
  350. struct iattr * sattr;
  351. unsigned int guard;
  352. struct timespec guardtime;
  353. };
  354. struct nfs3_diropargs {
  355. struct nfs_fh * fh;
  356. const char * name;
  357. unsigned int len;
  358. };
  359. struct nfs3_accessargs {
  360. struct nfs_fh * fh;
  361. __u32 access;
  362. };
  363. struct nfs3_createargs {
  364. struct nfs_fh * fh;
  365. const char * name;
  366. unsigned int len;
  367. struct iattr * sattr;
  368. enum nfs3_createmode createmode;
  369. __u32 verifier[2];
  370. };
  371. struct nfs3_mkdirargs {
  372. struct nfs_fh * fh;
  373. const char * name;
  374. unsigned int len;
  375. struct iattr * sattr;
  376. };
  377. struct nfs3_symlinkargs {
  378. struct nfs_fh * fromfh;
  379. const char * fromname;
  380. unsigned int fromlen;
  381. const char * topath;
  382. unsigned int tolen;
  383. struct iattr * sattr;
  384. };
  385. struct nfs3_mknodargs {
  386. struct nfs_fh * fh;
  387. const char * name;
  388. unsigned int len;
  389. enum nfs3_ftype type;
  390. struct iattr * sattr;
  391. dev_t rdev;
  392. };
  393. struct nfs3_renameargs {
  394. struct nfs_fh * fromfh;
  395. const char * fromname;
  396. unsigned int fromlen;
  397. struct nfs_fh * tofh;
  398. const char * toname;
  399. unsigned int tolen;
  400. };
  401. struct nfs3_linkargs {
  402. struct nfs_fh * fromfh;
  403. struct nfs_fh * tofh;
  404. const char * toname;
  405. unsigned int tolen;
  406. };
  407. struct nfs3_readdirargs {
  408. struct nfs_fh * fh;
  409. __u64 cookie;
  410. __u32 verf[2];
  411. int plus;
  412. unsigned int count;
  413. struct page ** pages;
  414. };
  415. struct nfs3_diropres {
  416. struct nfs_fattr * dir_attr;
  417. struct nfs_fh * fh;
  418. struct nfs_fattr * fattr;
  419. };
  420. struct nfs3_accessres {
  421. struct nfs_fattr * fattr;
  422. __u32 access;
  423. };
  424. struct nfs3_readlinkargs {
  425. struct nfs_fh * fh;
  426. unsigned int pgbase;
  427. unsigned int pglen;
  428. struct page ** pages;
  429. };
  430. struct nfs3_renameres {
  431. struct nfs_fattr * fromattr;
  432. struct nfs_fattr * toattr;
  433. };
  434. struct nfs3_linkres {
  435. struct nfs_fattr * dir_attr;
  436. struct nfs_fattr * fattr;
  437. };
  438. struct nfs3_readdirres {
  439. struct nfs_fattr * dir_attr;
  440. __u32 * verf;
  441. int plus;
  442. };
  443. struct nfs3_getaclres {
  444. struct nfs_fattr * fattr;
  445. int mask;
  446. unsigned int acl_access_count;
  447. unsigned int acl_default_count;
  448. struct posix_acl * acl_access;
  449. struct posix_acl * acl_default;
  450. };
  451. #ifdef CONFIG_NFS_V4
  452. typedef u64 clientid4;
  453. struct nfs4_accessargs {
  454. const struct nfs_fh * fh;
  455. u32 access;
  456. };
  457. struct nfs4_accessres {
  458. u32 supported;
  459. u32 access;
  460. };
  461. struct nfs4_create_arg {
  462. u32 ftype;
  463. union {
  464. struct qstr * symlink; /* NF4LNK */
  465. struct {
  466. u32 specdata1;
  467. u32 specdata2;
  468. } device; /* NF4BLK, NF4CHR */
  469. } u;
  470. const struct qstr * name;
  471. const struct nfs_server * server;
  472. const struct iattr * attrs;
  473. const struct nfs_fh * dir_fh;
  474. const u32 * bitmask;
  475. };
  476. struct nfs4_create_res {
  477. const struct nfs_server * server;
  478. struct nfs_fh * fh;
  479. struct nfs_fattr * fattr;
  480. struct nfs4_change_info dir_cinfo;
  481. struct nfs_fattr * dir_fattr;
  482. };
  483. struct nfs4_fsinfo_arg {
  484. const struct nfs_fh * fh;
  485. const u32 * bitmask;
  486. };
  487. struct nfs4_getattr_arg {
  488. const struct nfs_fh * fh;
  489. const u32 * bitmask;
  490. };
  491. struct nfs4_getattr_res {
  492. const struct nfs_server * server;
  493. struct nfs_fattr * fattr;
  494. };
  495. struct nfs4_link_arg {
  496. const struct nfs_fh * fh;
  497. const struct nfs_fh * dir_fh;
  498. const struct qstr * name;
  499. const u32 * bitmask;
  500. };
  501. struct nfs4_link_res {
  502. const struct nfs_server * server;
  503. struct nfs_fattr * fattr;
  504. struct nfs4_change_info cinfo;
  505. struct nfs_fattr * dir_attr;
  506. };
  507. struct nfs4_lookup_arg {
  508. const struct nfs_fh * dir_fh;
  509. const struct qstr * name;
  510. const u32 * bitmask;
  511. };
  512. struct nfs4_lookup_res {
  513. const struct nfs_server * server;
  514. struct nfs_fattr * fattr;
  515. struct nfs_fh * fh;
  516. };
  517. struct nfs4_lookup_root_arg {
  518. const u32 * bitmask;
  519. };
  520. struct nfs4_pathconf_arg {
  521. const struct nfs_fh * fh;
  522. const u32 * bitmask;
  523. };
  524. struct nfs4_readdir_arg {
  525. const struct nfs_fh * fh;
  526. u64 cookie;
  527. nfs4_verifier verifier;
  528. u32 count;
  529. struct page ** pages; /* zero-copy data */
  530. unsigned int pgbase; /* zero-copy data */
  531. const u32 * bitmask;
  532. };
  533. struct nfs4_readdir_res {
  534. nfs4_verifier verifier;
  535. unsigned int pgbase;
  536. };
  537. struct nfs4_readlink {
  538. const struct nfs_fh * fh;
  539. unsigned int pgbase;
  540. unsigned int pglen; /* zero-copy data */
  541. struct page ** pages; /* zero-copy data */
  542. };
  543. struct nfs4_remove_arg {
  544. const struct nfs_fh * fh;
  545. const struct qstr * name;
  546. const u32 * bitmask;
  547. };
  548. struct nfs4_remove_res {
  549. const struct nfs_server * server;
  550. struct nfs4_change_info cinfo;
  551. struct nfs_fattr * dir_attr;
  552. };
  553. struct nfs4_rename_arg {
  554. const struct nfs_fh * old_dir;
  555. const struct nfs_fh * new_dir;
  556. const struct qstr * old_name;
  557. const struct qstr * new_name;
  558. const u32 * bitmask;
  559. };
  560. struct nfs4_rename_res {
  561. const struct nfs_server * server;
  562. struct nfs4_change_info old_cinfo;
  563. struct nfs_fattr * old_fattr;
  564. struct nfs4_change_info new_cinfo;
  565. struct nfs_fattr * new_fattr;
  566. };
  567. struct nfs4_setclientid {
  568. const nfs4_verifier * sc_verifier; /* request */
  569. unsigned int sc_name_len;
  570. char sc_name[32]; /* request */
  571. u32 sc_prog; /* request */
  572. unsigned int sc_netid_len;
  573. char sc_netid[4]; /* request */
  574. unsigned int sc_uaddr_len;
  575. char sc_uaddr[24]; /* request */
  576. u32 sc_cb_ident; /* request */
  577. };
  578. struct nfs4_statfs_arg {
  579. const struct nfs_fh * fh;
  580. const u32 * bitmask;
  581. };
  582. struct nfs4_server_caps_res {
  583. u32 attr_bitmask[2];
  584. u32 acl_bitmask;
  585. u32 has_links;
  586. u32 has_symlinks;
  587. };
  588. #endif /* CONFIG_NFS_V4 */
  589. struct nfs_page;
  590. struct nfs_read_data {
  591. int flags;
  592. struct rpc_task task;
  593. struct inode *inode;
  594. struct rpc_cred *cred;
  595. struct nfs_fattr fattr; /* fattr storage */
  596. struct list_head pages; /* Coalesced read requests */
  597. struct nfs_page *req; /* multi ops per nfs_page */
  598. struct page *pagevec[NFS_READ_MAXIOV];
  599. struct nfs_readargs args;
  600. struct nfs_readres res;
  601. #ifdef CONFIG_NFS_V4
  602. unsigned long timestamp; /* For lease renewal */
  603. #endif
  604. void (*complete) (struct nfs_read_data *, int);
  605. };
  606. struct nfs_write_data {
  607. int flags;
  608. struct rpc_task task;
  609. struct inode *inode;
  610. struct rpc_cred *cred;
  611. struct nfs_fattr fattr;
  612. struct nfs_writeverf verf;
  613. struct list_head pages; /* Coalesced requests we wish to flush */
  614. struct nfs_page *req; /* multi ops per nfs_page */
  615. struct page *pagevec[NFS_WRITE_MAXIOV];
  616. struct nfs_writeargs args; /* argument struct */
  617. struct nfs_writeres res; /* result struct */
  618. #ifdef CONFIG_NFS_V4
  619. unsigned long timestamp; /* For lease renewal */
  620. #endif
  621. void (*complete) (struct nfs_write_data *, int);
  622. };
  623. struct nfs_access_entry;
  624. /*
  625. * RPC procedure vector for NFSv2/NFSv3 demuxing
  626. */
  627. struct nfs_rpc_ops {
  628. int version; /* Protocol version */
  629. struct dentry_operations *dentry_ops;
  630. struct inode_operations *dir_inode_ops;
  631. struct inode_operations *file_inode_ops;
  632. int (*getroot) (struct nfs_server *, struct nfs_fh *,
  633. struct nfs_fsinfo *);
  634. int (*getattr) (struct nfs_server *, struct nfs_fh *,
  635. struct nfs_fattr *);
  636. int (*setattr) (struct dentry *, struct nfs_fattr *,
  637. struct iattr *);
  638. int (*lookup) (struct inode *, struct qstr *,
  639. struct nfs_fh *, struct nfs_fattr *);
  640. int (*access) (struct inode *, struct nfs_access_entry *);
  641. int (*readlink)(struct inode *, struct page *, unsigned int,
  642. unsigned int);
  643. int (*read) (struct nfs_read_data *);
  644. int (*write) (struct nfs_write_data *);
  645. int (*commit) (struct nfs_write_data *);
  646. int (*create) (struct inode *, struct dentry *,
  647. struct iattr *, int, struct nameidata *);
  648. int (*remove) (struct inode *, struct qstr *);
  649. int (*unlink_setup) (struct rpc_message *,
  650. struct dentry *, struct qstr *);
  651. int (*unlink_done) (struct dentry *, struct rpc_task *);
  652. int (*rename) (struct inode *, struct qstr *,
  653. struct inode *, struct qstr *);
  654. int (*link) (struct inode *, struct inode *, struct qstr *);
  655. int (*symlink) (struct inode *, struct qstr *, struct qstr *,
  656. struct iattr *, struct nfs_fh *,
  657. struct nfs_fattr *);
  658. int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
  659. int (*rmdir) (struct inode *, struct qstr *);
  660. int (*readdir) (struct dentry *, struct rpc_cred *,
  661. u64, struct page *, unsigned int, int);
  662. int (*mknod) (struct inode *, struct dentry *, struct iattr *,
  663. dev_t);
  664. int (*statfs) (struct nfs_server *, struct nfs_fh *,
  665. struct nfs_fsstat *);
  666. int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
  667. struct nfs_fsinfo *);
  668. int (*pathconf) (struct nfs_server *, struct nfs_fh *,
  669. struct nfs_pathconf *);
  670. u32 * (*decode_dirent)(u32 *, struct nfs_entry *, int plus);
  671. void (*read_setup) (struct nfs_read_data *);
  672. void (*write_setup) (struct nfs_write_data *, int how);
  673. void (*commit_setup) (struct nfs_write_data *, int how);
  674. int (*file_open) (struct inode *, struct file *);
  675. int (*file_release) (struct inode *, struct file *);
  676. int (*lock)(struct file *, int, struct file_lock *);
  677. void (*clear_acl_cache)(struct inode *);
  678. };
  679. /*
  680. * NFS_CALL(getattr, inode, (fattr));
  681. * into
  682. * NFS_PROTO(inode)->getattr(fattr);
  683. */
  684. #define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
  685. /*
  686. * Function vectors etc. for the NFS client
  687. */
  688. extern struct nfs_rpc_ops nfs_v2_clientops;
  689. extern struct nfs_rpc_ops nfs_v3_clientops;
  690. extern struct nfs_rpc_ops nfs_v4_clientops;
  691. extern struct rpc_version nfs_version2;
  692. extern struct rpc_version nfs_version3;
  693. extern struct rpc_version nfs_version4;
  694. extern struct rpc_version nfsacl_version3;
  695. extern struct rpc_program nfsacl_program;
  696. #endif