nfs_xdr.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  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 timestamp;
  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. const struct nfs_server *server;
  117. int delegation_type;
  118. nfs4_stateid delegation;
  119. __u32 do_recall;
  120. __u64 maxsize;
  121. };
  122. /*
  123. * Arguments to the open_confirm call.
  124. */
  125. struct nfs_open_confirmargs {
  126. const struct nfs_fh * fh;
  127. nfs4_stateid stateid;
  128. struct nfs_seqid * seqid;
  129. };
  130. struct nfs_open_confirmres {
  131. nfs4_stateid stateid;
  132. };
  133. /*
  134. * Arguments to the close call.
  135. */
  136. struct nfs_closeargs {
  137. struct nfs_fh * fh;
  138. nfs4_stateid * stateid;
  139. struct nfs_seqid * seqid;
  140. int open_flags;
  141. };
  142. struct nfs_closeres {
  143. nfs4_stateid stateid;
  144. };
  145. /*
  146. * * Arguments to the lock,lockt, and locku call.
  147. * */
  148. struct nfs_lowner {
  149. __u64 clientid;
  150. u32 id;
  151. };
  152. struct nfs_lock_opargs {
  153. struct nfs_seqid * lock_seqid;
  154. nfs4_stateid * lock_stateid;
  155. struct nfs_seqid * open_seqid;
  156. nfs4_stateid * open_stateid;
  157. struct nfs_lowner lock_owner;
  158. __u32 reclaim;
  159. __u32 new_lock_owner;
  160. };
  161. struct nfs_locku_opargs {
  162. struct nfs_seqid * seqid;
  163. nfs4_stateid * stateid;
  164. };
  165. struct nfs_lockargs {
  166. struct nfs_fh * fh;
  167. __u32 type;
  168. __u64 offset;
  169. __u64 length;
  170. union {
  171. struct nfs_lock_opargs *lock; /* LOCK */
  172. struct nfs_lowner *lockt; /* LOCKT */
  173. struct nfs_locku_opargs *locku; /* LOCKU */
  174. } u;
  175. };
  176. struct nfs_lock_denied {
  177. __u64 offset;
  178. __u64 length;
  179. __u32 type;
  180. struct nfs_lowner owner;
  181. };
  182. struct nfs_lockres {
  183. union {
  184. nfs4_stateid stateid;/* LOCK success, LOCKU */
  185. struct nfs_lock_denied denied; /* LOCK failed, LOCKT success */
  186. } u;
  187. const struct nfs_server * server;
  188. };
  189. struct nfs4_delegreturnargs {
  190. const struct nfs_fh *fhandle;
  191. const nfs4_stateid *stateid;
  192. };
  193. /*
  194. * Arguments to the read call.
  195. */
  196. #define NFS_READ_MAXIOV (9U)
  197. #if (NFS_READ_MAXIOV > (MAX_IOVEC -2))
  198. #error "NFS_READ_MAXIOV is too large"
  199. #endif
  200. struct nfs_readargs {
  201. struct nfs_fh * fh;
  202. struct nfs_open_context *context;
  203. __u64 offset;
  204. __u32 count;
  205. unsigned int pgbase;
  206. struct page ** pages;
  207. };
  208. struct nfs_readres {
  209. struct nfs_fattr * fattr;
  210. __u32 count;
  211. int eof;
  212. };
  213. /*
  214. * Arguments to the write call.
  215. */
  216. #define NFS_WRITE_MAXIOV (9U)
  217. #if (NFS_WRITE_MAXIOV > (MAX_IOVEC -2))
  218. #error "NFS_WRITE_MAXIOV is too large"
  219. #endif
  220. struct nfs_writeargs {
  221. struct nfs_fh * fh;
  222. struct nfs_open_context *context;
  223. __u64 offset;
  224. __u32 count;
  225. enum nfs3_stable_how stable;
  226. unsigned int pgbase;
  227. struct page ** pages;
  228. };
  229. struct nfs_writeverf {
  230. enum nfs3_stable_how committed;
  231. __u32 verifier[2];
  232. };
  233. struct nfs_writeres {
  234. struct nfs_fattr * fattr;
  235. struct nfs_writeverf * verf;
  236. __u32 count;
  237. };
  238. /*
  239. * Argument struct for decode_entry function
  240. */
  241. struct nfs_entry {
  242. __u64 ino;
  243. __u64 cookie,
  244. prev_cookie;
  245. const char * name;
  246. unsigned int len;
  247. int eof;
  248. struct nfs_fh * fh;
  249. struct nfs_fattr * fattr;
  250. };
  251. /*
  252. * The following types are for NFSv2 only.
  253. */
  254. struct nfs_sattrargs {
  255. struct nfs_fh * fh;
  256. struct iattr * sattr;
  257. };
  258. struct nfs_diropargs {
  259. struct nfs_fh * fh;
  260. const char * name;
  261. unsigned int len;
  262. };
  263. struct nfs_createargs {
  264. struct nfs_fh * fh;
  265. const char * name;
  266. unsigned int len;
  267. struct iattr * sattr;
  268. };
  269. struct nfs_renameargs {
  270. struct nfs_fh * fromfh;
  271. const char * fromname;
  272. unsigned int fromlen;
  273. struct nfs_fh * tofh;
  274. const char * toname;
  275. unsigned int tolen;
  276. };
  277. struct nfs_setattrargs {
  278. struct nfs_fh * fh;
  279. nfs4_stateid stateid;
  280. struct iattr * iap;
  281. const struct nfs_server * server; /* Needed for name mapping */
  282. const u32 * bitmask;
  283. };
  284. struct nfs_setaclargs {
  285. struct nfs_fh * fh;
  286. size_t acl_len;
  287. unsigned int acl_pgbase;
  288. struct page ** acl_pages;
  289. };
  290. struct nfs_getaclargs {
  291. struct nfs_fh * fh;
  292. size_t acl_len;
  293. unsigned int acl_pgbase;
  294. struct page ** acl_pages;
  295. };
  296. struct nfs_setattrres {
  297. struct nfs_fattr * fattr;
  298. const struct nfs_server * server;
  299. };
  300. struct nfs_linkargs {
  301. struct nfs_fh * fromfh;
  302. struct nfs_fh * tofh;
  303. const char * toname;
  304. unsigned int tolen;
  305. };
  306. struct nfs_symlinkargs {
  307. struct nfs_fh * fromfh;
  308. const char * fromname;
  309. unsigned int fromlen;
  310. const char * topath;
  311. unsigned int tolen;
  312. struct iattr * sattr;
  313. };
  314. struct nfs_readdirargs {
  315. struct nfs_fh * fh;
  316. __u32 cookie;
  317. unsigned int count;
  318. struct page ** pages;
  319. };
  320. struct nfs3_getaclargs {
  321. struct nfs_fh * fh;
  322. int mask;
  323. struct page ** pages;
  324. };
  325. struct nfs3_setaclargs {
  326. struct inode * inode;
  327. int mask;
  328. struct posix_acl * acl_access;
  329. struct posix_acl * acl_default;
  330. struct page ** pages;
  331. };
  332. struct nfs_diropok {
  333. struct nfs_fh * fh;
  334. struct nfs_fattr * fattr;
  335. };
  336. struct nfs_readlinkargs {
  337. struct nfs_fh * fh;
  338. unsigned int pgbase;
  339. unsigned int pglen;
  340. struct page ** pages;
  341. };
  342. struct nfs3_sattrargs {
  343. struct nfs_fh * fh;
  344. struct iattr * sattr;
  345. unsigned int guard;
  346. struct timespec guardtime;
  347. };
  348. struct nfs3_diropargs {
  349. struct nfs_fh * fh;
  350. const char * name;
  351. unsigned int len;
  352. };
  353. struct nfs3_accessargs {
  354. struct nfs_fh * fh;
  355. __u32 access;
  356. };
  357. struct nfs3_createargs {
  358. struct nfs_fh * fh;
  359. const char * name;
  360. unsigned int len;
  361. struct iattr * sattr;
  362. enum nfs3_createmode createmode;
  363. __u32 verifier[2];
  364. };
  365. struct nfs3_mkdirargs {
  366. struct nfs_fh * fh;
  367. const char * name;
  368. unsigned int len;
  369. struct iattr * sattr;
  370. };
  371. struct nfs3_symlinkargs {
  372. struct nfs_fh * fromfh;
  373. const char * fromname;
  374. unsigned int fromlen;
  375. const char * topath;
  376. unsigned int tolen;
  377. struct iattr * sattr;
  378. };
  379. struct nfs3_mknodargs {
  380. struct nfs_fh * fh;
  381. const char * name;
  382. unsigned int len;
  383. enum nfs3_ftype type;
  384. struct iattr * sattr;
  385. dev_t rdev;
  386. };
  387. struct nfs3_renameargs {
  388. struct nfs_fh * fromfh;
  389. const char * fromname;
  390. unsigned int fromlen;
  391. struct nfs_fh * tofh;
  392. const char * toname;
  393. unsigned int tolen;
  394. };
  395. struct nfs3_linkargs {
  396. struct nfs_fh * fromfh;
  397. struct nfs_fh * tofh;
  398. const char * toname;
  399. unsigned int tolen;
  400. };
  401. struct nfs3_readdirargs {
  402. struct nfs_fh * fh;
  403. __u64 cookie;
  404. __u32 verf[2];
  405. int plus;
  406. unsigned int count;
  407. struct page ** pages;
  408. };
  409. struct nfs3_diropres {
  410. struct nfs_fattr * dir_attr;
  411. struct nfs_fh * fh;
  412. struct nfs_fattr * fattr;
  413. };
  414. struct nfs3_accessres {
  415. struct nfs_fattr * fattr;
  416. __u32 access;
  417. };
  418. struct nfs3_readlinkargs {
  419. struct nfs_fh * fh;
  420. unsigned int pgbase;
  421. unsigned int pglen;
  422. struct page ** pages;
  423. };
  424. struct nfs3_renameres {
  425. struct nfs_fattr * fromattr;
  426. struct nfs_fattr * toattr;
  427. };
  428. struct nfs3_linkres {
  429. struct nfs_fattr * dir_attr;
  430. struct nfs_fattr * fattr;
  431. };
  432. struct nfs3_readdirres {
  433. struct nfs_fattr * dir_attr;
  434. __u32 * verf;
  435. int plus;
  436. };
  437. struct nfs3_getaclres {
  438. struct nfs_fattr * fattr;
  439. int mask;
  440. unsigned int acl_access_count;
  441. unsigned int acl_default_count;
  442. struct posix_acl * acl_access;
  443. struct posix_acl * acl_default;
  444. };
  445. #ifdef CONFIG_NFS_V4
  446. typedef u64 clientid4;
  447. struct nfs4_accessargs {
  448. const struct nfs_fh * fh;
  449. u32 access;
  450. };
  451. struct nfs4_accessres {
  452. u32 supported;
  453. u32 access;
  454. };
  455. struct nfs4_create_arg {
  456. u32 ftype;
  457. union {
  458. struct qstr * symlink; /* NF4LNK */
  459. struct {
  460. u32 specdata1;
  461. u32 specdata2;
  462. } device; /* NF4BLK, NF4CHR */
  463. } u;
  464. const struct qstr * name;
  465. const struct nfs_server * server;
  466. const struct iattr * attrs;
  467. const struct nfs_fh * dir_fh;
  468. const u32 * bitmask;
  469. };
  470. struct nfs4_create_res {
  471. const struct nfs_server * server;
  472. struct nfs_fh * fh;
  473. struct nfs_fattr * fattr;
  474. struct nfs4_change_info dir_cinfo;
  475. };
  476. struct nfs4_fsinfo_arg {
  477. const struct nfs_fh * fh;
  478. const u32 * bitmask;
  479. };
  480. struct nfs4_getattr_arg {
  481. const struct nfs_fh * fh;
  482. const u32 * bitmask;
  483. };
  484. struct nfs4_getattr_res {
  485. const struct nfs_server * server;
  486. struct nfs_fattr * fattr;
  487. };
  488. struct nfs4_link_arg {
  489. const struct nfs_fh * fh;
  490. const struct nfs_fh * dir_fh;
  491. const struct qstr * name;
  492. };
  493. struct nfs4_lookup_arg {
  494. const struct nfs_fh * dir_fh;
  495. const struct qstr * name;
  496. const u32 * bitmask;
  497. };
  498. struct nfs4_lookup_res {
  499. const struct nfs_server * server;
  500. struct nfs_fattr * fattr;
  501. struct nfs_fh * fh;
  502. };
  503. struct nfs4_lookup_root_arg {
  504. const u32 * bitmask;
  505. };
  506. struct nfs4_pathconf_arg {
  507. const struct nfs_fh * fh;
  508. const u32 * bitmask;
  509. };
  510. struct nfs4_readdir_arg {
  511. const struct nfs_fh * fh;
  512. u64 cookie;
  513. nfs4_verifier verifier;
  514. u32 count;
  515. struct page ** pages; /* zero-copy data */
  516. unsigned int pgbase; /* zero-copy data */
  517. const u32 * bitmask;
  518. };
  519. struct nfs4_readdir_res {
  520. nfs4_verifier verifier;
  521. unsigned int pgbase;
  522. };
  523. struct nfs4_readlink {
  524. const struct nfs_fh * fh;
  525. unsigned int pgbase;
  526. unsigned int pglen; /* zero-copy data */
  527. struct page ** pages; /* zero-copy data */
  528. };
  529. struct nfs4_remove_arg {
  530. const struct nfs_fh * fh;
  531. const struct qstr * name;
  532. };
  533. struct nfs4_rename_arg {
  534. const struct nfs_fh * old_dir;
  535. const struct nfs_fh * new_dir;
  536. const struct qstr * old_name;
  537. const struct qstr * new_name;
  538. };
  539. struct nfs4_rename_res {
  540. struct nfs4_change_info old_cinfo;
  541. struct nfs4_change_info new_cinfo;
  542. };
  543. struct nfs4_setclientid {
  544. const nfs4_verifier * sc_verifier; /* request */
  545. unsigned int sc_name_len;
  546. char sc_name[32]; /* request */
  547. u32 sc_prog; /* request */
  548. unsigned int sc_netid_len;
  549. char sc_netid[4]; /* request */
  550. unsigned int sc_uaddr_len;
  551. char sc_uaddr[24]; /* request */
  552. u32 sc_cb_ident; /* request */
  553. };
  554. struct nfs4_statfs_arg {
  555. const struct nfs_fh * fh;
  556. const u32 * bitmask;
  557. };
  558. struct nfs4_server_caps_res {
  559. u32 attr_bitmask[2];
  560. u32 acl_bitmask;
  561. u32 has_links;
  562. u32 has_symlinks;
  563. };
  564. #endif /* CONFIG_NFS_V4 */
  565. struct nfs_page;
  566. struct nfs_read_data {
  567. int flags;
  568. struct rpc_task task;
  569. struct inode *inode;
  570. struct rpc_cred *cred;
  571. struct nfs_fattr fattr; /* fattr storage */
  572. struct list_head pages; /* Coalesced read requests */
  573. struct nfs_page *req; /* multi ops per nfs_page */
  574. struct page *pagevec[NFS_READ_MAXIOV];
  575. struct nfs_readargs args;
  576. struct nfs_readres res;
  577. #ifdef CONFIG_NFS_V4
  578. unsigned long timestamp; /* For lease renewal */
  579. #endif
  580. void (*complete) (struct nfs_read_data *, int);
  581. };
  582. struct nfs_write_data {
  583. int flags;
  584. struct rpc_task task;
  585. struct inode *inode;
  586. struct rpc_cred *cred;
  587. struct nfs_fattr fattr;
  588. struct nfs_writeverf verf;
  589. struct list_head pages; /* Coalesced requests we wish to flush */
  590. struct nfs_page *req; /* multi ops per nfs_page */
  591. struct page *pagevec[NFS_WRITE_MAXIOV];
  592. struct nfs_writeargs args; /* argument struct */
  593. struct nfs_writeres res; /* result struct */
  594. #ifdef CONFIG_NFS_V4
  595. unsigned long timestamp; /* For lease renewal */
  596. #endif
  597. void (*complete) (struct nfs_write_data *, int);
  598. };
  599. struct nfs_access_entry;
  600. /*
  601. * RPC procedure vector for NFSv2/NFSv3 demuxing
  602. */
  603. struct nfs_rpc_ops {
  604. int version; /* Protocol version */
  605. struct dentry_operations *dentry_ops;
  606. struct inode_operations *dir_inode_ops;
  607. struct inode_operations *file_inode_ops;
  608. int (*getroot) (struct nfs_server *, struct nfs_fh *,
  609. struct nfs_fsinfo *);
  610. int (*getattr) (struct nfs_server *, struct nfs_fh *,
  611. struct nfs_fattr *);
  612. int (*setattr) (struct dentry *, struct nfs_fattr *,
  613. struct iattr *);
  614. int (*lookup) (struct inode *, struct qstr *,
  615. struct nfs_fh *, struct nfs_fattr *);
  616. int (*access) (struct inode *, struct nfs_access_entry *);
  617. int (*readlink)(struct inode *, struct page *, unsigned int,
  618. unsigned int);
  619. int (*read) (struct nfs_read_data *);
  620. int (*write) (struct nfs_write_data *);
  621. int (*commit) (struct nfs_write_data *);
  622. int (*create) (struct inode *, struct dentry *,
  623. struct iattr *, int, struct nameidata *);
  624. int (*remove) (struct inode *, struct qstr *);
  625. int (*unlink_setup) (struct rpc_message *,
  626. struct dentry *, struct qstr *);
  627. int (*unlink_done) (struct dentry *, struct rpc_task *);
  628. int (*rename) (struct inode *, struct qstr *,
  629. struct inode *, struct qstr *);
  630. int (*link) (struct inode *, struct inode *, struct qstr *);
  631. int (*symlink) (struct inode *, struct qstr *, struct qstr *,
  632. struct iattr *, struct nfs_fh *,
  633. struct nfs_fattr *);
  634. int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
  635. int (*rmdir) (struct inode *, struct qstr *);
  636. int (*readdir) (struct dentry *, struct rpc_cred *,
  637. u64, struct page *, unsigned int, int);
  638. int (*mknod) (struct inode *, struct dentry *, struct iattr *,
  639. dev_t);
  640. int (*statfs) (struct nfs_server *, struct nfs_fh *,
  641. struct nfs_fsstat *);
  642. int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
  643. struct nfs_fsinfo *);
  644. int (*pathconf) (struct nfs_server *, struct nfs_fh *,
  645. struct nfs_pathconf *);
  646. u32 * (*decode_dirent)(u32 *, struct nfs_entry *, int plus);
  647. void (*read_setup) (struct nfs_read_data *);
  648. void (*write_setup) (struct nfs_write_data *, int how);
  649. void (*commit_setup) (struct nfs_write_data *, int how);
  650. int (*file_open) (struct inode *, struct file *);
  651. int (*file_release) (struct inode *, struct file *);
  652. int (*lock)(struct file *, int, struct file_lock *);
  653. void (*clear_acl_cache)(struct inode *);
  654. };
  655. /*
  656. * NFS_CALL(getattr, inode, (fattr));
  657. * into
  658. * NFS_PROTO(inode)->getattr(fattr);
  659. */
  660. #define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
  661. /*
  662. * Function vectors etc. for the NFS client
  663. */
  664. extern struct nfs_rpc_ops nfs_v2_clientops;
  665. extern struct nfs_rpc_ops nfs_v3_clientops;
  666. extern struct nfs_rpc_ops nfs_v4_clientops;
  667. extern struct rpc_version nfs_version2;
  668. extern struct rpc_version nfs_version3;
  669. extern struct rpc_version nfs_version4;
  670. extern struct rpc_version nfsacl_version3;
  671. extern struct rpc_program nfsacl_program;
  672. #endif