nfs_xdr.h 17 KB

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