nfs_xdr.h 18 KB

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