nfs_xdr.h 17 KB

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