proc.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. /*
  2. * linux/fs/nfs/proc.c
  3. *
  4. * Copyright (C) 1992, 1993, 1994 Rick Sladkey
  5. *
  6. * OS-independent nfs remote procedure call functions
  7. *
  8. * Tuned by Alan Cox <A.Cox@swansea.ac.uk> for >3K buffers
  9. * so at last we can have decent(ish) throughput off a
  10. * Sun server.
  11. *
  12. * Coding optimized and cleaned up by Florian La Roche.
  13. * Note: Error returns are optimized for NFS_OK, which isn't translated via
  14. * nfs_stat_to_errno(), but happens to be already the right return code.
  15. *
  16. * Also, the code currently doesn't check the size of the packet, when
  17. * it decodes the packet.
  18. *
  19. * Feel free to fix it and mail me the diffs if it worries you.
  20. *
  21. * Completely rewritten to support the new RPC call interface;
  22. * rewrote and moved the entire XDR stuff to xdr.c
  23. * --Olaf Kirch June 1996
  24. *
  25. * The code below initializes all auto variables explicitly, otherwise
  26. * it will fail to work as a module (gcc generates a memset call for an
  27. * incomplete struct).
  28. */
  29. #include <linux/types.h>
  30. #include <linux/param.h>
  31. #include <linux/slab.h>
  32. #include <linux/time.h>
  33. #include <linux/mm.h>
  34. #include <linux/utsname.h>
  35. #include <linux/errno.h>
  36. #include <linux/string.h>
  37. #include <linux/in.h>
  38. #include <linux/pagemap.h>
  39. #include <linux/sunrpc/clnt.h>
  40. #include <linux/nfs.h>
  41. #include <linux/nfs2.h>
  42. #include <linux/nfs_fs.h>
  43. #include <linux/nfs_page.h>
  44. #include <linux/lockd/bind.h>
  45. #include "internal.h"
  46. #define NFSDBG_FACILITY NFSDBG_PROC
  47. /*
  48. * Bare-bones access to getattr: this is for nfs_read_super.
  49. */
  50. static int
  51. nfs_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
  52. struct nfs_fsinfo *info)
  53. {
  54. struct nfs_fattr *fattr = info->fattr;
  55. struct nfs2_fsstat fsinfo;
  56. struct rpc_message msg = {
  57. .rpc_proc = &nfs_procedures[NFSPROC_GETATTR],
  58. .rpc_argp = fhandle,
  59. .rpc_resp = fattr,
  60. };
  61. int status;
  62. dprintk("%s: call getattr\n", __FUNCTION__);
  63. nfs_fattr_init(fattr);
  64. status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0);
  65. dprintk("%s: reply getattr: %d\n", __FUNCTION__, status);
  66. if (status)
  67. return status;
  68. dprintk("%s: call statfs\n", __FUNCTION__);
  69. msg.rpc_proc = &nfs_procedures[NFSPROC_STATFS];
  70. msg.rpc_resp = &fsinfo;
  71. status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0);
  72. dprintk("%s: reply statfs: %d\n", __FUNCTION__, status);
  73. if (status)
  74. return status;
  75. info->rtmax = NFS_MAXDATA;
  76. info->rtpref = fsinfo.tsize;
  77. info->rtmult = fsinfo.bsize;
  78. info->wtmax = NFS_MAXDATA;
  79. info->wtpref = fsinfo.tsize;
  80. info->wtmult = fsinfo.bsize;
  81. info->dtpref = fsinfo.tsize;
  82. info->maxfilesize = 0x7FFFFFFF;
  83. info->lease_time = 0;
  84. return 0;
  85. }
  86. /*
  87. * One function for each procedure in the NFS protocol.
  88. */
  89. static int
  90. nfs_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
  91. struct nfs_fattr *fattr)
  92. {
  93. struct rpc_message msg = {
  94. .rpc_proc = &nfs_procedures[NFSPROC_GETATTR],
  95. .rpc_argp = fhandle,
  96. .rpc_resp = fattr,
  97. };
  98. int status;
  99. dprintk("NFS call getattr\n");
  100. nfs_fattr_init(fattr);
  101. status = rpc_call_sync(server->client, &msg, 0);
  102. dprintk("NFS reply getattr: %d\n", status);
  103. return status;
  104. }
  105. static int
  106. nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
  107. struct iattr *sattr)
  108. {
  109. struct inode *inode = dentry->d_inode;
  110. struct nfs_sattrargs arg = {
  111. .fh = NFS_FH(inode),
  112. .sattr = sattr
  113. };
  114. struct rpc_message msg = {
  115. .rpc_proc = &nfs_procedures[NFSPROC_SETATTR],
  116. .rpc_argp = &arg,
  117. .rpc_resp = fattr,
  118. };
  119. int status;
  120. /* Mask out the non-modebit related stuff from attr->ia_mode */
  121. sattr->ia_mode &= S_IALLUGO;
  122. dprintk("NFS call setattr\n");
  123. nfs_fattr_init(fattr);
  124. status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
  125. if (status == 0)
  126. nfs_setattr_update_inode(inode, sattr);
  127. dprintk("NFS reply setattr: %d\n", status);
  128. return status;
  129. }
  130. static int
  131. nfs_proc_lookup(struct inode *dir, struct qstr *name,
  132. struct nfs_fh *fhandle, struct nfs_fattr *fattr)
  133. {
  134. struct nfs_diropargs arg = {
  135. .fh = NFS_FH(dir),
  136. .name = name->name,
  137. .len = name->len
  138. };
  139. struct nfs_diropok res = {
  140. .fh = fhandle,
  141. .fattr = fattr
  142. };
  143. struct rpc_message msg = {
  144. .rpc_proc = &nfs_procedures[NFSPROC_LOOKUP],
  145. .rpc_argp = &arg,
  146. .rpc_resp = &res,
  147. };
  148. int status;
  149. dprintk("NFS call lookup %s\n", name->name);
  150. nfs_fattr_init(fattr);
  151. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  152. dprintk("NFS reply lookup: %d\n", status);
  153. return status;
  154. }
  155. static int nfs_proc_readlink(struct inode *inode, struct page *page,
  156. unsigned int pgbase, unsigned int pglen)
  157. {
  158. struct nfs_readlinkargs args = {
  159. .fh = NFS_FH(inode),
  160. .pgbase = pgbase,
  161. .pglen = pglen,
  162. .pages = &page
  163. };
  164. struct rpc_message msg = {
  165. .rpc_proc = &nfs_procedures[NFSPROC_READLINK],
  166. .rpc_argp = &args,
  167. };
  168. int status;
  169. dprintk("NFS call readlink\n");
  170. status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
  171. dprintk("NFS reply readlink: %d\n", status);
  172. return status;
  173. }
  174. static int
  175. nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
  176. int flags, struct nameidata *nd)
  177. {
  178. struct nfs_fh fhandle;
  179. struct nfs_fattr fattr;
  180. struct nfs_createargs arg = {
  181. .fh = NFS_FH(dir),
  182. .name = dentry->d_name.name,
  183. .len = dentry->d_name.len,
  184. .sattr = sattr
  185. };
  186. struct nfs_diropok res = {
  187. .fh = &fhandle,
  188. .fattr = &fattr
  189. };
  190. struct rpc_message msg = {
  191. .rpc_proc = &nfs_procedures[NFSPROC_CREATE],
  192. .rpc_argp = &arg,
  193. .rpc_resp = &res,
  194. };
  195. int status;
  196. nfs_fattr_init(&fattr);
  197. dprintk("NFS call create %s\n", dentry->d_name.name);
  198. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  199. nfs_mark_for_revalidate(dir);
  200. if (status == 0)
  201. status = nfs_instantiate(dentry, &fhandle, &fattr);
  202. dprintk("NFS reply create: %d\n", status);
  203. return status;
  204. }
  205. /*
  206. * In NFSv2, mknod is grafted onto the create call.
  207. */
  208. static int
  209. nfs_proc_mknod(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
  210. dev_t rdev)
  211. {
  212. struct nfs_fh fhandle;
  213. struct nfs_fattr fattr;
  214. struct nfs_createargs arg = {
  215. .fh = NFS_FH(dir),
  216. .name = dentry->d_name.name,
  217. .len = dentry->d_name.len,
  218. .sattr = sattr
  219. };
  220. struct nfs_diropok res = {
  221. .fh = &fhandle,
  222. .fattr = &fattr
  223. };
  224. struct rpc_message msg = {
  225. .rpc_proc = &nfs_procedures[NFSPROC_CREATE],
  226. .rpc_argp = &arg,
  227. .rpc_resp = &res,
  228. };
  229. int status, mode;
  230. dprintk("NFS call mknod %s\n", dentry->d_name.name);
  231. mode = sattr->ia_mode;
  232. if (S_ISFIFO(mode)) {
  233. sattr->ia_mode = (mode & ~S_IFMT) | S_IFCHR;
  234. sattr->ia_valid &= ~ATTR_SIZE;
  235. } else if (S_ISCHR(mode) || S_ISBLK(mode)) {
  236. sattr->ia_valid |= ATTR_SIZE;
  237. sattr->ia_size = new_encode_dev(rdev);/* get out your barf bag */
  238. }
  239. nfs_fattr_init(&fattr);
  240. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  241. nfs_mark_for_revalidate(dir);
  242. if (status == -EINVAL && S_ISFIFO(mode)) {
  243. sattr->ia_mode = mode;
  244. nfs_fattr_init(&fattr);
  245. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  246. }
  247. if (status == 0)
  248. status = nfs_instantiate(dentry, &fhandle, &fattr);
  249. dprintk("NFS reply mknod: %d\n", status);
  250. return status;
  251. }
  252. static int
  253. nfs_proc_remove(struct inode *dir, struct qstr *name)
  254. {
  255. struct nfs_removeargs arg = {
  256. .fh = NFS_FH(dir),
  257. .name.len = name->len,
  258. .name.name = name->name,
  259. };
  260. struct rpc_message msg = {
  261. .rpc_proc = &nfs_procedures[NFSPROC_REMOVE],
  262. .rpc_argp = &arg,
  263. };
  264. int status;
  265. dprintk("NFS call remove %s\n", name->name);
  266. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  267. nfs_mark_for_revalidate(dir);
  268. dprintk("NFS reply remove: %d\n", status);
  269. return status;
  270. }
  271. static void
  272. nfs_proc_unlink_setup(struct rpc_message *msg, struct inode *dir)
  273. {
  274. msg->rpc_proc = &nfs_procedures[NFSPROC_REMOVE];
  275. }
  276. static int nfs_proc_unlink_done(struct rpc_task *task, struct inode *dir)
  277. {
  278. nfs_mark_for_revalidate(dir);
  279. return 1;
  280. }
  281. static int
  282. nfs_proc_rename(struct inode *old_dir, struct qstr *old_name,
  283. struct inode *new_dir, struct qstr *new_name)
  284. {
  285. struct nfs_renameargs arg = {
  286. .fromfh = NFS_FH(old_dir),
  287. .fromname = old_name->name,
  288. .fromlen = old_name->len,
  289. .tofh = NFS_FH(new_dir),
  290. .toname = new_name->name,
  291. .tolen = new_name->len
  292. };
  293. struct rpc_message msg = {
  294. .rpc_proc = &nfs_procedures[NFSPROC_RENAME],
  295. .rpc_argp = &arg,
  296. };
  297. int status;
  298. dprintk("NFS call rename %s -> %s\n", old_name->name, new_name->name);
  299. status = rpc_call_sync(NFS_CLIENT(old_dir), &msg, 0);
  300. nfs_mark_for_revalidate(old_dir);
  301. nfs_mark_for_revalidate(new_dir);
  302. dprintk("NFS reply rename: %d\n", status);
  303. return status;
  304. }
  305. static int
  306. nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
  307. {
  308. struct nfs_linkargs arg = {
  309. .fromfh = NFS_FH(inode),
  310. .tofh = NFS_FH(dir),
  311. .toname = name->name,
  312. .tolen = name->len
  313. };
  314. struct rpc_message msg = {
  315. .rpc_proc = &nfs_procedures[NFSPROC_LINK],
  316. .rpc_argp = &arg,
  317. };
  318. int status;
  319. dprintk("NFS call link %s\n", name->name);
  320. status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
  321. nfs_mark_for_revalidate(inode);
  322. nfs_mark_for_revalidate(dir);
  323. dprintk("NFS reply link: %d\n", status);
  324. return status;
  325. }
  326. static int
  327. nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct page *page,
  328. unsigned int len, struct iattr *sattr)
  329. {
  330. struct nfs_fh fhandle;
  331. struct nfs_fattr fattr;
  332. struct nfs_symlinkargs arg = {
  333. .fromfh = NFS_FH(dir),
  334. .fromname = dentry->d_name.name,
  335. .fromlen = dentry->d_name.len,
  336. .pages = &page,
  337. .pathlen = len,
  338. .sattr = sattr
  339. };
  340. struct rpc_message msg = {
  341. .rpc_proc = &nfs_procedures[NFSPROC_SYMLINK],
  342. .rpc_argp = &arg,
  343. };
  344. int status;
  345. if (len > NFS2_MAXPATHLEN)
  346. return -ENAMETOOLONG;
  347. dprintk("NFS call symlink %s\n", dentry->d_name.name);
  348. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  349. nfs_mark_for_revalidate(dir);
  350. /*
  351. * V2 SYMLINK requests don't return any attributes. Setting the
  352. * filehandle size to zero indicates to nfs_instantiate that it
  353. * should fill in the data with a LOOKUP call on the wire.
  354. */
  355. if (status == 0) {
  356. nfs_fattr_init(&fattr);
  357. fhandle.size = 0;
  358. status = nfs_instantiate(dentry, &fhandle, &fattr);
  359. }
  360. dprintk("NFS reply symlink: %d\n", status);
  361. return status;
  362. }
  363. static int
  364. nfs_proc_mkdir(struct inode *dir, struct dentry *dentry, struct iattr *sattr)
  365. {
  366. struct nfs_fh fhandle;
  367. struct nfs_fattr fattr;
  368. struct nfs_createargs arg = {
  369. .fh = NFS_FH(dir),
  370. .name = dentry->d_name.name,
  371. .len = dentry->d_name.len,
  372. .sattr = sattr
  373. };
  374. struct nfs_diropok res = {
  375. .fh = &fhandle,
  376. .fattr = &fattr
  377. };
  378. struct rpc_message msg = {
  379. .rpc_proc = &nfs_procedures[NFSPROC_MKDIR],
  380. .rpc_argp = &arg,
  381. .rpc_resp = &res,
  382. };
  383. int status;
  384. dprintk("NFS call mkdir %s\n", dentry->d_name.name);
  385. nfs_fattr_init(&fattr);
  386. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  387. nfs_mark_for_revalidate(dir);
  388. if (status == 0)
  389. status = nfs_instantiate(dentry, &fhandle, &fattr);
  390. dprintk("NFS reply mkdir: %d\n", status);
  391. return status;
  392. }
  393. static int
  394. nfs_proc_rmdir(struct inode *dir, struct qstr *name)
  395. {
  396. struct nfs_diropargs arg = {
  397. .fh = NFS_FH(dir),
  398. .name = name->name,
  399. .len = name->len
  400. };
  401. struct rpc_message msg = {
  402. .rpc_proc = &nfs_procedures[NFSPROC_RMDIR],
  403. .rpc_argp = &arg,
  404. };
  405. int status;
  406. dprintk("NFS call rmdir %s\n", name->name);
  407. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  408. nfs_mark_for_revalidate(dir);
  409. dprintk("NFS reply rmdir: %d\n", status);
  410. return status;
  411. }
  412. /*
  413. * The READDIR implementation is somewhat hackish - we pass a temporary
  414. * buffer to the encode function, which installs it in the receive
  415. * the receive iovec. The decode function just parses the reply to make
  416. * sure it is syntactically correct; the entries itself are decoded
  417. * from nfs_readdir by calling the decode_entry function directly.
  418. */
  419. static int
  420. nfs_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
  421. u64 cookie, struct page *page, unsigned int count, int plus)
  422. {
  423. struct inode *dir = dentry->d_inode;
  424. struct nfs_readdirargs arg = {
  425. .fh = NFS_FH(dir),
  426. .cookie = cookie,
  427. .count = count,
  428. .pages = &page,
  429. };
  430. struct rpc_message msg = {
  431. .rpc_proc = &nfs_procedures[NFSPROC_READDIR],
  432. .rpc_argp = &arg,
  433. .rpc_cred = cred,
  434. };
  435. int status;
  436. dprintk("NFS call readdir %d\n", (unsigned int)cookie);
  437. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  438. nfs_invalidate_atime(dir);
  439. dprintk("NFS reply readdir: %d\n", status);
  440. return status;
  441. }
  442. static int
  443. nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
  444. struct nfs_fsstat *stat)
  445. {
  446. struct nfs2_fsstat fsinfo;
  447. struct rpc_message msg = {
  448. .rpc_proc = &nfs_procedures[NFSPROC_STATFS],
  449. .rpc_argp = fhandle,
  450. .rpc_resp = &fsinfo,
  451. };
  452. int status;
  453. dprintk("NFS call statfs\n");
  454. nfs_fattr_init(stat->fattr);
  455. status = rpc_call_sync(server->client, &msg, 0);
  456. dprintk("NFS reply statfs: %d\n", status);
  457. if (status)
  458. goto out;
  459. stat->tbytes = (u64)fsinfo.blocks * fsinfo.bsize;
  460. stat->fbytes = (u64)fsinfo.bfree * fsinfo.bsize;
  461. stat->abytes = (u64)fsinfo.bavail * fsinfo.bsize;
  462. stat->tfiles = 0;
  463. stat->ffiles = 0;
  464. stat->afiles = 0;
  465. out:
  466. return status;
  467. }
  468. static int
  469. nfs_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
  470. struct nfs_fsinfo *info)
  471. {
  472. struct nfs2_fsstat fsinfo;
  473. struct rpc_message msg = {
  474. .rpc_proc = &nfs_procedures[NFSPROC_STATFS],
  475. .rpc_argp = fhandle,
  476. .rpc_resp = &fsinfo,
  477. };
  478. int status;
  479. dprintk("NFS call fsinfo\n");
  480. nfs_fattr_init(info->fattr);
  481. status = rpc_call_sync(server->client, &msg, 0);
  482. dprintk("NFS reply fsinfo: %d\n", status);
  483. if (status)
  484. goto out;
  485. info->rtmax = NFS_MAXDATA;
  486. info->rtpref = fsinfo.tsize;
  487. info->rtmult = fsinfo.bsize;
  488. info->wtmax = NFS_MAXDATA;
  489. info->wtpref = fsinfo.tsize;
  490. info->wtmult = fsinfo.bsize;
  491. info->dtpref = fsinfo.tsize;
  492. info->maxfilesize = 0x7FFFFFFF;
  493. info->lease_time = 0;
  494. out:
  495. return status;
  496. }
  497. static int
  498. nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
  499. struct nfs_pathconf *info)
  500. {
  501. info->max_link = 0;
  502. info->max_namelen = NFS2_MAXNAMLEN;
  503. return 0;
  504. }
  505. static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data)
  506. {
  507. nfs_invalidate_atime(data->inode);
  508. if (task->tk_status >= 0) {
  509. nfs_refresh_inode(data->inode, data->res.fattr);
  510. /* Emulate the eof flag, which isn't normally needed in NFSv2
  511. * as it is guaranteed to always return the file attributes
  512. */
  513. if (data->args.offset + data->args.count >= data->res.fattr->size)
  514. data->res.eof = 1;
  515. }
  516. return 0;
  517. }
  518. static void nfs_proc_read_setup(struct nfs_read_data *data)
  519. {
  520. struct rpc_message msg = {
  521. .rpc_proc = &nfs_procedures[NFSPROC_READ],
  522. .rpc_argp = &data->args,
  523. .rpc_resp = &data->res,
  524. .rpc_cred = data->cred,
  525. };
  526. rpc_call_setup(&data->task, &msg, 0);
  527. }
  528. static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data)
  529. {
  530. if (task->tk_status >= 0)
  531. nfs_post_op_update_inode_force_wcc(data->inode, data->res.fattr);
  532. return 0;
  533. }
  534. static void nfs_proc_write_setup(struct nfs_write_data *data, int how)
  535. {
  536. struct rpc_message msg = {
  537. .rpc_proc = &nfs_procedures[NFSPROC_WRITE],
  538. .rpc_argp = &data->args,
  539. .rpc_resp = &data->res,
  540. .rpc_cred = data->cred,
  541. };
  542. /* Note: NFSv2 ignores @stable and always uses NFS_FILE_SYNC */
  543. data->args.stable = NFS_FILE_SYNC;
  544. /* Finalize the task. */
  545. rpc_call_setup(&data->task, &msg, 0);
  546. }
  547. static void
  548. nfs_proc_commit_setup(struct nfs_write_data *data, int how)
  549. {
  550. BUG();
  551. }
  552. static int
  553. nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl)
  554. {
  555. return nlmclnt_proc(filp->f_path.dentry->d_inode, cmd, fl);
  556. }
  557. const struct nfs_rpc_ops nfs_v2_clientops = {
  558. .version = 2, /* protocol version */
  559. .dentry_ops = &nfs_dentry_operations,
  560. .dir_inode_ops = &nfs_dir_inode_operations,
  561. .file_inode_ops = &nfs_file_inode_operations,
  562. .getroot = nfs_proc_get_root,
  563. .getattr = nfs_proc_getattr,
  564. .setattr = nfs_proc_setattr,
  565. .lookup = nfs_proc_lookup,
  566. .access = NULL, /* access */
  567. .readlink = nfs_proc_readlink,
  568. .create = nfs_proc_create,
  569. .remove = nfs_proc_remove,
  570. .unlink_setup = nfs_proc_unlink_setup,
  571. .unlink_done = nfs_proc_unlink_done,
  572. .rename = nfs_proc_rename,
  573. .link = nfs_proc_link,
  574. .symlink = nfs_proc_symlink,
  575. .mkdir = nfs_proc_mkdir,
  576. .rmdir = nfs_proc_rmdir,
  577. .readdir = nfs_proc_readdir,
  578. .mknod = nfs_proc_mknod,
  579. .statfs = nfs_proc_statfs,
  580. .fsinfo = nfs_proc_fsinfo,
  581. .pathconf = nfs_proc_pathconf,
  582. .decode_dirent = nfs_decode_dirent,
  583. .read_setup = nfs_proc_read_setup,
  584. .read_done = nfs_read_done,
  585. .write_setup = nfs_proc_write_setup,
  586. .write_done = nfs_write_done,
  587. .commit_setup = nfs_proc_commit_setup,
  588. .file_open = nfs_open,
  589. .file_release = nfs_release,
  590. .lock = nfs_proc_lock,
  591. };