nfsproc.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. /*
  2. * nfsproc2.c Process version 2 NFS requests.
  3. * linux/fs/nfsd/nfs2proc.c
  4. *
  5. * Process version 2 NFS requests.
  6. *
  7. * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
  8. */
  9. #include <linux/linkage.h>
  10. #include <linux/time.h>
  11. #include <linux/errno.h>
  12. #include <linux/fs.h>
  13. #include <linux/stat.h>
  14. #include <linux/fcntl.h>
  15. #include <linux/net.h>
  16. #include <linux/in.h>
  17. #include <linux/namei.h>
  18. #include <linux/unistd.h>
  19. #include <linux/slab.h>
  20. #include <linux/sunrpc/svc.h>
  21. #include <linux/nfsd/nfsd.h>
  22. #include <linux/nfsd/cache.h>
  23. #include <linux/nfsd/xdr.h>
  24. typedef struct svc_rqst svc_rqst;
  25. typedef struct svc_buf svc_buf;
  26. #define NFSDDBG_FACILITY NFSDDBG_PROC
  27. static int
  28. nfsd_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
  29. {
  30. return nfs_ok;
  31. }
  32. /*
  33. * Get a file's attributes
  34. * N.B. After this call resp->fh needs an fh_put
  35. */
  36. static int
  37. nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
  38. struct nfsd_attrstat *resp)
  39. {
  40. dprintk("nfsd: GETATTR %s\n", SVCFH_fmt(&argp->fh));
  41. fh_copy(&resp->fh, &argp->fh);
  42. return fh_verify(rqstp, &resp->fh, 0, MAY_NOP);
  43. }
  44. /*
  45. * Set a file's attributes
  46. * N.B. After this call resp->fh needs an fh_put
  47. */
  48. static int
  49. nfsd_proc_setattr(struct svc_rqst *rqstp, struct nfsd_sattrargs *argp,
  50. struct nfsd_attrstat *resp)
  51. {
  52. dprintk("nfsd: SETATTR %s, valid=%x, size=%ld\n",
  53. SVCFH_fmt(&argp->fh),
  54. argp->attrs.ia_valid, (long) argp->attrs.ia_size);
  55. fh_copy(&resp->fh, &argp->fh);
  56. return nfsd_setattr(rqstp, &resp->fh, &argp->attrs,0, (time_t)0);
  57. }
  58. /*
  59. * Look up a path name component
  60. * Note: the dentry in the resp->fh may be negative if the file
  61. * doesn't exist yet.
  62. * N.B. After this call resp->fh needs an fh_put
  63. */
  64. static int
  65. nfsd_proc_lookup(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
  66. struct nfsd_diropres *resp)
  67. {
  68. int nfserr;
  69. dprintk("nfsd: LOOKUP %s %.*s\n",
  70. SVCFH_fmt(&argp->fh), argp->len, argp->name);
  71. fh_init(&resp->fh, NFS_FHSIZE);
  72. nfserr = nfsd_lookup(rqstp, &argp->fh, argp->name, argp->len,
  73. &resp->fh);
  74. fh_put(&argp->fh);
  75. return nfserr;
  76. }
  77. /*
  78. * Read a symlink.
  79. */
  80. static int
  81. nfsd_proc_readlink(struct svc_rqst *rqstp, struct nfsd_readlinkargs *argp,
  82. struct nfsd_readlinkres *resp)
  83. {
  84. int nfserr;
  85. dprintk("nfsd: READLINK %s\n", SVCFH_fmt(&argp->fh));
  86. /* Read the symlink. */
  87. resp->len = NFS_MAXPATHLEN;
  88. nfserr = nfsd_readlink(rqstp, &argp->fh, argp->buffer, &resp->len);
  89. fh_put(&argp->fh);
  90. return nfserr;
  91. }
  92. /*
  93. * Read a portion of a file.
  94. * N.B. After this call resp->fh needs an fh_put
  95. */
  96. static int
  97. nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
  98. struct nfsd_readres *resp)
  99. {
  100. int nfserr;
  101. dprintk("nfsd: READ %s %d bytes at %d\n",
  102. SVCFH_fmt(&argp->fh),
  103. argp->count, argp->offset);
  104. /* Obtain buffer pointer for payload. 19 is 1 word for
  105. * status, 17 words for fattr, and 1 word for the byte count.
  106. */
  107. if (NFSSVC_MAXBLKSIZE < argp->count) {
  108. printk(KERN_NOTICE
  109. "oversized read request from %u.%u.%u.%u:%d (%d bytes)\n",
  110. NIPQUAD(rqstp->rq_addr.sin_addr.s_addr),
  111. ntohs(rqstp->rq_addr.sin_port),
  112. argp->count);
  113. argp->count = NFSSVC_MAXBLKSIZE;
  114. }
  115. svc_reserve(rqstp, (19<<2) + argp->count + 4);
  116. resp->count = argp->count;
  117. nfserr = nfsd_read(rqstp, fh_copy(&resp->fh, &argp->fh), NULL,
  118. argp->offset,
  119. argp->vec, argp->vlen,
  120. &resp->count);
  121. return nfserr;
  122. }
  123. /*
  124. * Write data to a file
  125. * N.B. After this call resp->fh needs an fh_put
  126. */
  127. static int
  128. nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp,
  129. struct nfsd_attrstat *resp)
  130. {
  131. int nfserr;
  132. int stable = 1;
  133. dprintk("nfsd: WRITE %s %d bytes at %d\n",
  134. SVCFH_fmt(&argp->fh),
  135. argp->len, argp->offset);
  136. nfserr = nfsd_write(rqstp, fh_copy(&resp->fh, &argp->fh), NULL,
  137. argp->offset,
  138. argp->vec, argp->vlen,
  139. argp->len,
  140. &stable);
  141. return nfserr;
  142. }
  143. /*
  144. * CREATE processing is complicated. The keyword here is `overloaded.'
  145. * The parent directory is kept locked between the check for existence
  146. * and the actual create() call in compliance with VFS protocols.
  147. * N.B. After this call _both_ argp->fh and resp->fh need an fh_put
  148. */
  149. static int
  150. nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
  151. struct nfsd_diropres *resp)
  152. {
  153. svc_fh *dirfhp = &argp->fh;
  154. svc_fh *newfhp = &resp->fh;
  155. struct iattr *attr = &argp->attrs;
  156. struct inode *inode;
  157. struct dentry *dchild;
  158. int nfserr, type, mode;
  159. dev_t rdev = 0, wanted = new_decode_dev(attr->ia_size);
  160. dprintk("nfsd: CREATE %s %.*s\n",
  161. SVCFH_fmt(dirfhp), argp->len, argp->name);
  162. /* First verify the parent file handle */
  163. nfserr = fh_verify(rqstp, dirfhp, S_IFDIR, MAY_EXEC);
  164. if (nfserr)
  165. goto done; /* must fh_put dirfhp even on error */
  166. /* Check for MAY_WRITE in nfsd_create if necessary */
  167. nfserr = nfserr_acces;
  168. if (!argp->len)
  169. goto done;
  170. nfserr = nfserr_exist;
  171. if (isdotent(argp->name, argp->len))
  172. goto done;
  173. fh_lock(dirfhp);
  174. dchild = lookup_one_len(argp->name, dirfhp->fh_dentry, argp->len);
  175. if (IS_ERR(dchild)) {
  176. nfserr = nfserrno(PTR_ERR(dchild));
  177. goto out_unlock;
  178. }
  179. fh_init(newfhp, NFS_FHSIZE);
  180. nfserr = fh_compose(newfhp, dirfhp->fh_export, dchild, dirfhp);
  181. if (!nfserr && !dchild->d_inode)
  182. nfserr = nfserr_noent;
  183. dput(dchild);
  184. if (nfserr) {
  185. if (nfserr != nfserr_noent)
  186. goto out_unlock;
  187. /*
  188. * If the new file handle wasn't verified, we can't tell
  189. * whether the file exists or not. Time to bail ...
  190. */
  191. nfserr = nfserr_acces;
  192. if (!newfhp->fh_dentry) {
  193. printk(KERN_WARNING
  194. "nfsd_proc_create: file handle not verified\n");
  195. goto out_unlock;
  196. }
  197. }
  198. inode = newfhp->fh_dentry->d_inode;
  199. /* Unfudge the mode bits */
  200. if (attr->ia_valid & ATTR_MODE) {
  201. type = attr->ia_mode & S_IFMT;
  202. mode = attr->ia_mode & ~S_IFMT;
  203. if (!type) {
  204. /* no type, so if target exists, assume same as that,
  205. * else assume a file */
  206. if (inode) {
  207. type = inode->i_mode & S_IFMT;
  208. switch(type) {
  209. case S_IFCHR:
  210. case S_IFBLK:
  211. /* reserve rdev for later checking */
  212. rdev = inode->i_rdev;
  213. attr->ia_valid |= ATTR_SIZE;
  214. /* FALLTHROUGH */
  215. case S_IFIFO:
  216. /* this is probably a permission check..
  217. * at least IRIX implements perm checking on
  218. * echo thing > device-special-file-or-pipe
  219. * by doing a CREATE with type==0
  220. */
  221. nfserr = nfsd_permission(newfhp->fh_export,
  222. newfhp->fh_dentry,
  223. MAY_WRITE|MAY_LOCAL_ACCESS);
  224. if (nfserr && nfserr != nfserr_rofs)
  225. goto out_unlock;
  226. }
  227. } else
  228. type = S_IFREG;
  229. }
  230. } else if (inode) {
  231. type = inode->i_mode & S_IFMT;
  232. mode = inode->i_mode & ~S_IFMT;
  233. } else {
  234. type = S_IFREG;
  235. mode = 0; /* ??? */
  236. }
  237. attr->ia_valid |= ATTR_MODE;
  238. attr->ia_mode = mode;
  239. /* Special treatment for non-regular files according to the
  240. * gospel of sun micro
  241. */
  242. if (type != S_IFREG) {
  243. int is_borc = 0;
  244. if (type != S_IFBLK && type != S_IFCHR) {
  245. rdev = 0;
  246. } else if (type == S_IFCHR && !(attr->ia_valid & ATTR_SIZE)) {
  247. /* If you think you've seen the worst, grok this. */
  248. type = S_IFIFO;
  249. } else {
  250. /* Okay, char or block special */
  251. is_borc = 1;
  252. if (!rdev)
  253. rdev = wanted;
  254. }
  255. /* we've used the SIZE information, so discard it */
  256. attr->ia_valid &= ~ATTR_SIZE;
  257. /* Make sure the type and device matches */
  258. nfserr = nfserr_exist;
  259. if (inode && type != (inode->i_mode & S_IFMT))
  260. goto out_unlock;
  261. }
  262. nfserr = 0;
  263. if (!inode) {
  264. /* File doesn't exist. Create it and set attrs */
  265. nfserr = nfsd_create(rqstp, dirfhp, argp->name, argp->len,
  266. attr, type, rdev, newfhp);
  267. } else if (type == S_IFREG) {
  268. dprintk("nfsd: existing %s, valid=%x, size=%ld\n",
  269. argp->name, attr->ia_valid, (long) attr->ia_size);
  270. /* File already exists. We ignore all attributes except
  271. * size, so that creat() behaves exactly like
  272. * open(..., O_CREAT|O_TRUNC|O_WRONLY).
  273. */
  274. attr->ia_valid &= ATTR_SIZE;
  275. if (attr->ia_valid)
  276. nfserr = nfsd_setattr(rqstp, newfhp, attr, 0, (time_t)0);
  277. }
  278. out_unlock:
  279. /* We don't really need to unlock, as fh_put does it. */
  280. fh_unlock(dirfhp);
  281. done:
  282. fh_put(dirfhp);
  283. return nfserr;
  284. }
  285. static int
  286. nfsd_proc_remove(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
  287. void *resp)
  288. {
  289. int nfserr;
  290. dprintk("nfsd: REMOVE %s %.*s\n", SVCFH_fmt(&argp->fh),
  291. argp->len, argp->name);
  292. /* Unlink. -SIFDIR means file must not be a directory */
  293. nfserr = nfsd_unlink(rqstp, &argp->fh, -S_IFDIR, argp->name, argp->len);
  294. fh_put(&argp->fh);
  295. return nfserr;
  296. }
  297. static int
  298. nfsd_proc_rename(struct svc_rqst *rqstp, struct nfsd_renameargs *argp,
  299. void *resp)
  300. {
  301. int nfserr;
  302. dprintk("nfsd: RENAME %s %.*s -> \n",
  303. SVCFH_fmt(&argp->ffh), argp->flen, argp->fname);
  304. dprintk("nfsd: -> %s %.*s\n",
  305. SVCFH_fmt(&argp->tfh), argp->tlen, argp->tname);
  306. nfserr = nfsd_rename(rqstp, &argp->ffh, argp->fname, argp->flen,
  307. &argp->tfh, argp->tname, argp->tlen);
  308. fh_put(&argp->ffh);
  309. fh_put(&argp->tfh);
  310. return nfserr;
  311. }
  312. static int
  313. nfsd_proc_link(struct svc_rqst *rqstp, struct nfsd_linkargs *argp,
  314. void *resp)
  315. {
  316. int nfserr;
  317. dprintk("nfsd: LINK %s ->\n",
  318. SVCFH_fmt(&argp->ffh));
  319. dprintk("nfsd: %s %.*s\n",
  320. SVCFH_fmt(&argp->tfh),
  321. argp->tlen,
  322. argp->tname);
  323. nfserr = nfsd_link(rqstp, &argp->tfh, argp->tname, argp->tlen,
  324. &argp->ffh);
  325. fh_put(&argp->ffh);
  326. fh_put(&argp->tfh);
  327. return nfserr;
  328. }
  329. static int
  330. nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp,
  331. void *resp)
  332. {
  333. struct svc_fh newfh;
  334. int nfserr;
  335. dprintk("nfsd: SYMLINK %s %.*s -> %.*s\n",
  336. SVCFH_fmt(&argp->ffh), argp->flen, argp->fname,
  337. argp->tlen, argp->tname);
  338. fh_init(&newfh, NFS_FHSIZE);
  339. /*
  340. * Create the link, look up new file and set attrs.
  341. */
  342. nfserr = nfsd_symlink(rqstp, &argp->ffh, argp->fname, argp->flen,
  343. argp->tname, argp->tlen,
  344. &newfh, &argp->attrs);
  345. fh_put(&argp->ffh);
  346. fh_put(&newfh);
  347. return nfserr;
  348. }
  349. /*
  350. * Make directory. This operation is not idempotent.
  351. * N.B. After this call resp->fh needs an fh_put
  352. */
  353. static int
  354. nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
  355. struct nfsd_diropres *resp)
  356. {
  357. int nfserr;
  358. dprintk("nfsd: MKDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name);
  359. if (resp->fh.fh_dentry) {
  360. printk(KERN_WARNING
  361. "nfsd_proc_mkdir: response already verified??\n");
  362. }
  363. argp->attrs.ia_valid &= ~ATTR_SIZE;
  364. fh_init(&resp->fh, NFS_FHSIZE);
  365. nfserr = nfsd_create(rqstp, &argp->fh, argp->name, argp->len,
  366. &argp->attrs, S_IFDIR, 0, &resp->fh);
  367. fh_put(&argp->fh);
  368. return nfserr;
  369. }
  370. /*
  371. * Remove a directory
  372. */
  373. static int
  374. nfsd_proc_rmdir(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
  375. void *resp)
  376. {
  377. int nfserr;
  378. dprintk("nfsd: RMDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name);
  379. nfserr = nfsd_unlink(rqstp, &argp->fh, S_IFDIR, argp->name, argp->len);
  380. fh_put(&argp->fh);
  381. return nfserr;
  382. }
  383. /*
  384. * Read a portion of a directory.
  385. */
  386. static int
  387. nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp,
  388. struct nfsd_readdirres *resp)
  389. {
  390. int nfserr, count;
  391. loff_t offset;
  392. dprintk("nfsd: READDIR %s %d bytes at %d\n",
  393. SVCFH_fmt(&argp->fh),
  394. argp->count, argp->cookie);
  395. /* Shrink to the client read size */
  396. count = (argp->count >> 2) - 2;
  397. /* Make sure we've room for the NULL ptr & eof flag */
  398. count -= 2;
  399. if (count < 0)
  400. count = 0;
  401. resp->buffer = argp->buffer;
  402. resp->offset = NULL;
  403. resp->buflen = count;
  404. resp->common.err = nfs_ok;
  405. /* Read directory and encode entries on the fly */
  406. offset = argp->cookie;
  407. nfserr = nfsd_readdir(rqstp, &argp->fh, &offset,
  408. &resp->common, nfssvc_encode_entry);
  409. resp->count = resp->buffer - argp->buffer;
  410. if (resp->offset)
  411. *resp->offset = htonl(offset);
  412. fh_put(&argp->fh);
  413. return nfserr;
  414. }
  415. /*
  416. * Get file system info
  417. */
  418. static int
  419. nfsd_proc_statfs(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
  420. struct nfsd_statfsres *resp)
  421. {
  422. int nfserr;
  423. dprintk("nfsd: STATFS %s\n", SVCFH_fmt(&argp->fh));
  424. nfserr = nfsd_statfs(rqstp, &argp->fh, &resp->stats);
  425. fh_put(&argp->fh);
  426. return nfserr;
  427. }
  428. /*
  429. * NFSv2 Server procedures.
  430. * Only the results of non-idempotent operations are cached.
  431. */
  432. #define nfsd_proc_none NULL
  433. #define nfssvc_release_none NULL
  434. struct nfsd_void { int dummy; };
  435. #define PROC(name, argt, rest, relt, cache, respsize) \
  436. { (svc_procfunc) nfsd_proc_##name, \
  437. (kxdrproc_t) nfssvc_decode_##argt, \
  438. (kxdrproc_t) nfssvc_encode_##rest, \
  439. (kxdrproc_t) nfssvc_release_##relt, \
  440. sizeof(struct nfsd_##argt), \
  441. sizeof(struct nfsd_##rest), \
  442. 0, \
  443. cache, \
  444. respsize, \
  445. }
  446. #define ST 1 /* status */
  447. #define FH 8 /* filehandle */
  448. #define AT 18 /* attributes */
  449. static struct svc_procedure nfsd_procedures2[18] = {
  450. PROC(null, void, void, none, RC_NOCACHE, ST),
  451. PROC(getattr, fhandle, attrstat, fhandle, RC_NOCACHE, ST+AT),
  452. PROC(setattr, sattrargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
  453. PROC(none, void, void, none, RC_NOCACHE, ST),
  454. PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT),
  455. PROC(readlink, readlinkargs, readlinkres, none, RC_NOCACHE, ST+1+NFS_MAXPATHLEN/4),
  456. PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE),
  457. PROC(none, void, void, none, RC_NOCACHE, ST),
  458. PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
  459. PROC(create, createargs, diropres, fhandle, RC_REPLBUFF, ST+FH+AT),
  460. PROC(remove, diropargs, void, none, RC_REPLSTAT, ST),
  461. PROC(rename, renameargs, void, none, RC_REPLSTAT, ST),
  462. PROC(link, linkargs, void, none, RC_REPLSTAT, ST),
  463. PROC(symlink, symlinkargs, void, none, RC_REPLSTAT, ST),
  464. PROC(mkdir, createargs, diropres, fhandle, RC_REPLBUFF, ST+FH+AT),
  465. PROC(rmdir, diropargs, void, none, RC_REPLSTAT, ST),
  466. PROC(readdir, readdirargs, readdirres, none, RC_NOCACHE, 0),
  467. PROC(statfs, fhandle, statfsres, none, RC_NOCACHE, ST+5),
  468. };
  469. struct svc_version nfsd_version2 = {
  470. .vs_vers = 2,
  471. .vs_nproc = 18,
  472. .vs_proc = nfsd_procedures2,
  473. .vs_dispatch = nfsd_dispatch,
  474. .vs_xdrsize = NFS2_SVC_XDRSIZE,
  475. };
  476. /*
  477. * Map errnos to NFS errnos.
  478. */
  479. int
  480. nfserrno (int errno)
  481. {
  482. static struct {
  483. int nfserr;
  484. int syserr;
  485. } nfs_errtbl[] = {
  486. { nfs_ok, 0 },
  487. { nfserr_perm, -EPERM },
  488. { nfserr_noent, -ENOENT },
  489. { nfserr_io, -EIO },
  490. { nfserr_nxio, -ENXIO },
  491. { nfserr_acces, -EACCES },
  492. { nfserr_exist, -EEXIST },
  493. { nfserr_xdev, -EXDEV },
  494. { nfserr_mlink, -EMLINK },
  495. { nfserr_nodev, -ENODEV },
  496. { nfserr_notdir, -ENOTDIR },
  497. { nfserr_isdir, -EISDIR },
  498. { nfserr_inval, -EINVAL },
  499. { nfserr_fbig, -EFBIG },
  500. { nfserr_nospc, -ENOSPC },
  501. { nfserr_rofs, -EROFS },
  502. { nfserr_mlink, -EMLINK },
  503. { nfserr_nametoolong, -ENAMETOOLONG },
  504. { nfserr_notempty, -ENOTEMPTY },
  505. #ifdef EDQUOT
  506. { nfserr_dquot, -EDQUOT },
  507. #endif
  508. { nfserr_stale, -ESTALE },
  509. { nfserr_jukebox, -ETIMEDOUT },
  510. { nfserr_dropit, -EAGAIN },
  511. { nfserr_dropit, -ENOMEM },
  512. { nfserr_badname, -ESRCH },
  513. { nfserr_io, -ETXTBSY },
  514. { nfserr_notsupp, -EOPNOTSUPP },
  515. { -1, -EIO }
  516. };
  517. int i;
  518. for (i = 0; nfs_errtbl[i].nfserr != -1; i++) {
  519. if (nfs_errtbl[i].syserr == errno)
  520. return nfs_errtbl[i].nfserr;
  521. }
  522. printk (KERN_INFO "nfsd: non-standard errno: %d\n", errno);
  523. return nfserr_io;
  524. }