nfs_xdr.h 17 KB

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