nfs_vfsops.c revision 1.15 1 /*
2 * Copyright (c) 1989 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. Neither the name of the University nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)nfs_vfsops.c 7.31 (Berkeley) 5/6/91
37 * $Id: nfs_vfsops.c,v 1.15 1994/04/18 06:18:22 glass Exp $
38 */
39
40 #include <sys/param.h>
41 #include <sys/conf.h>
42 #include <sys/ioctl.h>
43 #include <sys/signal.h>
44 #include <sys/proc.h>
45 #include <sys/namei.h>
46 #include <sys/vnode.h>
47 #include <sys/mount.h>
48 #include <sys/buf.h>
49 #include <sys/mbuf.h>
50 #include <sys/socket.h>
51 #include <sys/systm.h>
52
53 #include <net/if.h>
54 #include <net/route.h>
55
56 #include <netinet/in.h>
57
58 #include <nfs/nfsv2.h>
59 #include <nfs/nfsnode.h>
60 #include <nfs/nfsmount.h>
61 #include <nfs/nfs.h>
62 #include <nfs/xdr_subs.h>
63 #include <nfs/nfsm_subs.h>
64 #include <nfs/nfsdiskless.h>
65
66 /*
67 * nfs vfs operations.
68 */
69 struct vfsops nfs_vfsops = {
70 MOUNT_NFS,
71 nfs_mount,
72 nfs_start,
73 nfs_unmount,
74 nfs_root,
75 nfs_quotactl,
76 nfs_statfs,
77 nfs_sync,
78 nfs_fhtovp,
79 nfs_vptofh,
80 nfs_init,
81 };
82
83 static u_char nfs_mntid;
84 extern u_long nfs_procids[NFS_NPROCS];
85 extern u_long nfs_prog, nfs_vers;
86 void nfs_disconnect();
87
88 #define TRUE 1
89 #define FALSE 0
90
91 /*
92 * nfs statfs call
93 */
94 nfs_statfs(mp, sbp, p)
95 struct mount *mp;
96 register struct statfs *sbp;
97 struct proc *p;
98 {
99 register struct vnode *vp;
100 register struct nfsv2_statfs *sfp;
101 register caddr_t cp;
102 register long t1;
103 caddr_t bpos, dpos, cp2;
104 u_long xid;
105 int error = 0;
106 struct mbuf *mreq, *mrep, *md, *mb, *mb2;
107 struct nfsmount *nmp;
108 struct ucred *cred;
109 struct nfsnode *np;
110
111 nmp = VFSTONFS(mp);
112 if (error = nfs_nget(mp, &nmp->nm_fh, &np))
113 return (error);
114 vp = NFSTOV(np);
115 nfsstats.rpccnt[NFSPROC_STATFS]++;
116 cred = crget();
117 cred->cr_ngroups = 1;
118 nfsm_reqhead(nfs_procids[NFSPROC_STATFS], cred, NFSX_FH);
119 nfsm_fhtom(vp);
120 nfsm_request(vp, NFSPROC_STATFS, p, 0);
121 nfsm_disect(sfp, struct nfsv2_statfs *, NFSX_STATFS);
122 #ifdef COMPAT_09
123 sbp->f_type = 2;
124 #else
125 sbp->f_type = 0;
126 #endif
127 sbp->f_flags = nmp->nm_flag;
128 sbp->f_bsize = fxdr_unsigned(long, sfp->sf_tsize);
129 sbp->f_fsize = fxdr_unsigned(long, sfp->sf_bsize);
130 sbp->f_blocks = fxdr_unsigned(long, sfp->sf_blocks);
131 sbp->f_bfree = fxdr_unsigned(long, sfp->sf_bfree);
132 sbp->f_bavail = fxdr_unsigned(long, sfp->sf_bavail);
133 sbp->f_files = 0;
134 sbp->f_ffree = 0;
135 if (sbp != &mp->mnt_stat) {
136 bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
137 bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
138 }
139 strncpy(&sbp->f_fstypename[0], mp->mnt_op->vfs_name, MFSNAMELEN);
140 sbp->f_fstypename[MFSNAMELEN] = '\0';
141 nfsm_reqdone;
142 nfs_nput(vp);
143 crfree(cred);
144 return (error);
145 }
146
147 /*
148 * Mount a remote root fs via. nfs.
149 *
150 * Configure up an interface
151 * Initialize a nfs_diskless struct with:
152 * ip addr
153 * broadcast addr
154 * netmask
155 * as acquired and implied by RARP.
156 *
157 * Then call nfs_boot() to fill in the rest of the structure with enough
158 * information to mount root and swap.
159 */
160 nfs_mountroot()
161 {
162 register struct mount *mp;
163 register struct mbuf *m;
164 struct socket *so;
165 struct vnode *vp;
166 struct ifnet *ifp;
167 struct sockaddr_in *sin;
168 struct in_addr myip;
169 struct ifreq ireq;
170 struct nfs_diskless diskless;
171 int error, len;
172
173 /*
174 * Find an interface, rarp for its ip address, stuff it, the
175 * implied broadcast addr, and netmask into a nfs_diskless struct.
176 */
177
178 for (ifp = ifnet; ifp; ifp = ifp->if_next)
179 if ((ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT)) == 0)
180 break;
181 if (ifp == NULL)
182 return ENETUNREACH;
183 strcpy(ireq.ifr_name, ifp->if_name);
184 len = strlen(ireq.ifr_name);
185 ireq.ifr_name[len] = '0' + ifp->if_unit; /* XXX */
186 ireq.ifr_name[len+1] = '\0';
187 ireq.ifr_flags = IFF_UP;
188 if (error = ifioctl(NULL, SIOCSIFFLAGS, &ireq, curproc))
189 panic("nfs_mountroot, bringing interface %s up",
190 ireq.ifr_name);
191 bzero((caddr_t) &diskless, sizeof(diskless));
192 strcpy(diskless.myif.ifra_name, ireq.ifr_name);
193 if (revarp_whoami(&myip, ifp))
194 panic("revarp failed");
195 sin = (struct sockaddr_in *) &ireq.ifr_addr;
196 bzero((caddr_t) sin, sizeof(struct sockaddr_in));
197 sin->sin_len = sizeof(struct sockaddr_in);
198 sin->sin_family = AF_INET;
199 sin->sin_addr = myip;
200
201 /*
202 * Do enough of ifconfig(8) so that the chosen interface can
203 * talk to the server(s).
204 */
205 if (socreate(AF_INET, &so, SOCK_DGRAM, 0))
206 panic("nfs ifconf");
207 if (ifioctl(so, SIOCSIFADDR, &ireq, curproc))
208 panic("nfs_mountroot: setting interface address\n");
209 bcopy((caddr_t) sin, (caddr_t) &diskless.myif.ifra_addr,
210 sizeof(struct sockaddr));
211 if (ifioctl(so, SIOCGIFBRDADDR, &ireq, curproc))
212 panic("nfs baddr");
213 bcopy((caddr_t) &ireq.ifr_broadaddr,
214 (caddr_t) &diskless.myif.ifra_broadaddr,
215 sizeof (ireq.ifr_broadaddr));
216 if (ifioctl(so, SIOCGIFNETMASK, &ireq, curproc))
217 panic("nfs get netmask");
218 soclose(so);
219
220 if (error = nfs_boot(&diskless))
221 return error;
222
223 /*
224 * If the gateway field is filled in, set it as the default route.
225 */
226 #ifdef COMPAT_43
227 if (diskless.mygateway.sa_family == AF_INET) {
228 struct ortentry rt;
229 struct sockaddr_in *sin;
230
231 sin = (struct sockaddr_in *) &rt.rt_dst;
232 sin->sin_len = sizeof (struct sockaddr_in);
233 sin->sin_family = AF_INET;
234 sin->sin_addr.s_addr = 0; /* default */
235 bcopy((caddr_t)&diskless.mygateway, (caddr_t)&rt.rt_gateway,
236 sizeof (struct sockaddr_in));
237 rt.rt_flags = (RTF_UP | RTF_GATEWAY);
238 if (rtioctl(SIOCADDRT, (caddr_t)&rt, curproc))
239 panic("nfs root route");
240 }
241 #endif /* COMPAT_43 */
242
243 /*
244 * If swapping to an nfs node (indicated by swdevt[0].sw_dev == NODEV):
245 * Create a fake mount point just for the swap vnode so that the
246 * swap file can be on a different server from the rootfs.
247 */
248 if (swdevt[0].sw_dev == NODEV) {
249 mp = (struct mount *)malloc((u_long)sizeof(struct mount),
250 M_MOUNT, M_NOWAIT);
251 if (mp == NULL)
252 panic("nfs root mount");
253 mp->mnt_op = &nfs_vfsops;
254 mp->mnt_flag = 0;
255 mp->mnt_exroot = 0;
256 mp->mnt_mounth = NULLVP;
257
258 /*
259 * Set up the diskless nfs_args for the swap mount point
260 * and then call mountnfs() to mount it.
261 * Since the swap file is not the root dir of a file system,
262 * hack it to a regular file.
263 */
264 diskless.swap_args.fh = (nfsv2fh_t *)diskless.swap_fh;
265 MGET(m, MT_SONAME, M_DONTWAIT);
266 if (m == NULL)
267 panic("nfs root mbuf");
268 bcopy((caddr_t)&diskless.swap_saddr, mtod(m, caddr_t),
269 diskless.swap_saddr.sa_len);
270 m->m_len = diskless.swap_saddr.sa_len;
271 if (mountnfs(&diskless.swap_args, mp, m, "/swap",
272 diskless.swap_hostnam, &vp))
273 panic("nfs swap");
274 vp->v_type = VREG;
275 vp->v_flag = 0;
276 swapdev_vp = vp;
277 VREF(vp);
278 swdevt[0].sw_vp = vp;
279 {
280 struct vattr attr;
281
282 if (nfs_dogetattr(vp,&attr,NOCRED,0,0)) {
283 panic("nfs swap getattr");
284 }
285 swdevt[0].sw_nblks = attr.va_size / DEV_BSIZE;
286 }
287 }
288
289 /*
290 * Create the rootfs mount point.
291 */
292 mp = (struct mount *)malloc((u_long)sizeof(struct mount),
293 M_MOUNT, M_NOWAIT);
294 if (mp == NULL)
295 panic("nfs root mount2");
296 mp->mnt_op = &nfs_vfsops;
297 mp->mnt_flag = MNT_RDONLY;
298 mp->mnt_exroot = 0;
299 mp->mnt_mounth = NULLVP;
300
301 /*
302 * Set up the root fs args and call mountnfs() to do the rest.
303 */
304 diskless.root_args.fh = (nfsv2fh_t *)diskless.root_fh;
305 MGET(m, MT_SONAME, M_DONTWAIT);
306 if (m == NULL)
307 panic("nfs root mbuf2");
308 bcopy((caddr_t)&diskless.root_saddr, mtod(m, caddr_t),
309 diskless.root_saddr.sa_len);
310 m->m_len = diskless.root_saddr.sa_len;
311 if (mountnfs(&diskless.root_args, mp, m, "/",
312 diskless.root_hostnam, &vp))
313 panic("nfs root");
314 if (vfs_lock(mp))
315 panic("nfs root2");
316 rootfs = mp;
317 mp->mnt_next = mp;
318 mp->mnt_prev = mp;
319 mp->mnt_vnodecovered = NULLVP;
320 vfs_unlock(mp);
321 rootvp = vp;
322 inittodr((time_t)0); /* There is no time in the nfs fsstat so ?? */
323 return (0);
324 }
325
326 static void
327 nfs_decode_flags(argp, nmp)
328 struct nfs_args *argp;
329 struct nfsmount *nmp;
330 {
331 int s = splnet();
332
333 /* Don't touch the lock flags */
334 nmp->nm_flag = (argp->flags & ~(NFSMNT_LOCKBITS)) |
335 (nmp->nm_flag & NFSMNT_LOCKBITS);
336 splx(s);
337
338 if ((argp->flags & NFSMNT_TIMEO) && argp->timeo > 0) {
339 nmp->nm_rto = argp->timeo;
340 /* NFS timeouts are specified in 1/10 sec. */
341 nmp->nm_rto = (nmp->nm_rto * 10) / NFS_HZ;
342 if (nmp->nm_rto < NFS_MINTIMEO)
343 nmp->nm_rto = NFS_MINTIMEO;
344 else if (nmp->nm_rto > NFS_MAXTIMEO)
345 nmp->nm_rto = NFS_MAXTIMEO;
346 nmp->nm_rttvar = nmp->nm_rto << 1;
347 }
348
349 if ((argp->flags & NFSMNT_RETRANS) && argp->retrans > 1) {
350 nmp->nm_retry = argp->retrans;
351 if (nmp->nm_retry > NFS_MAXREXMIT)
352 nmp->nm_retry = NFS_MAXREXMIT;
353 }
354
355 if ((argp->flags & NFSMNT_WSIZE) && argp->wsize > 0) {
356 nmp->nm_wsize = argp->wsize;
357 /* Round down to multiple of blocksize */
358 nmp->nm_wsize &= ~0x1ff;
359 if (nmp->nm_wsize <= 0)
360 nmp->nm_wsize = 512;
361 else if (nmp->nm_wsize > NFS_MAXDATA)
362 nmp->nm_wsize = NFS_MAXDATA;
363 }
364 if (nmp->nm_wsize > MAXBSIZE)
365 nmp->nm_wsize = MAXBSIZE;
366
367 if ((argp->flags & NFSMNT_RSIZE) && argp->rsize > 0) {
368 nmp->nm_rsize = argp->rsize;
369 /* Round down to multiple of blocksize */
370 nmp->nm_rsize &= ~0x1ff;
371 if (nmp->nm_rsize <= 0)
372 nmp->nm_rsize = 512;
373 else if (nmp->nm_rsize > NFS_MAXDATA)
374 nmp->nm_rsize = NFS_MAXDATA;
375 }
376 if (nmp->nm_rsize > MAXBSIZE)
377 nmp->nm_rsize = MAXBSIZE;
378 }
379
380 /*
381 * VFS Operations.
382 *
383 * mount system call
384 * It seems a bit dumb to copyinstr() the host and path here and then
385 * bcopy() them in mountnfs(), but I wanted to detect errors before
386 * doing the sockargs() call because sockargs() allocates an mbuf and
387 * an error after that means that I have to release the mbuf.
388 */
389 /* ARGSUSED */
390 nfs_mount(mp, path, data, ndp, p)
391 struct mount *mp;
392 char *path;
393 caddr_t data;
394 struct nameidata *ndp;
395 struct proc *p;
396 {
397 int error;
398 struct nfs_args args;
399 struct mbuf *nam;
400 struct vnode *vp;
401 char pth[MNAMELEN], hst[MNAMELEN];
402 u_int len;
403 nfsv2fh_t nfh;
404
405 if (error = copyin(data, (caddr_t)&args, sizeof (struct nfs_args)))
406 return (error);
407 if (mp->mnt_flag & MNT_UPDATE) {
408 register struct nfsmount *nmp = VFSTONFS(mp);
409
410 if (nmp == NULL)
411 return EIO;
412 nfs_decode_flags(&args, nmp);
413 return (0);
414 }
415 if (error = copyin((caddr_t)args.fh, (caddr_t)&nfh, sizeof (nfsv2fh_t)))
416 return (error);
417 if (error = copyinstr(path, pth, MNAMELEN-1, &len))
418 return (error);
419 bzero(&pth[len], MNAMELEN - len);
420 if (error = copyinstr(args.hostname, hst, MNAMELEN-1, &len))
421 return (error);
422 bzero(&hst[len], MNAMELEN - len);
423 /* sockargs() call must be after above copyin() calls */
424 if (error = sockargs(&nam, (caddr_t)args.addr,
425 sizeof (struct sockaddr), MT_SONAME))
426 return (error);
427 args.fh = &nfh;
428 error = mountnfs(&args, mp, nam, pth, hst, &vp);
429 return (error);
430 }
431
432 /*
433 * Common code for mount and mountroot
434 */
435 mountnfs(argp, mp, nam, pth, hst, vpp)
436 register struct nfs_args *argp;
437 register struct mount *mp;
438 struct mbuf *nam;
439 char *pth, *hst;
440 struct vnode **vpp;
441 {
442 register struct nfsmount *nmp;
443 struct proc *p = curproc; /* XXX */
444 struct nfsnode *np;
445 int error;
446 fsid_t tfsid;
447
448 MALLOC(nmp, struct nfsmount *, sizeof *nmp, M_NFSMNT, M_WAITOK);
449 bzero((caddr_t)nmp, sizeof *nmp);
450 mp->mnt_data = (qaddr_t)nmp;
451
452 getnewfsid(mp, (int)MOUNT_NFS);
453 nmp->nm_mountp = mp;
454 nmp->nm_rto = NFS_TIMEO;
455 nmp->nm_rtt = -1;
456 nmp->nm_rttvar = nmp->nm_rto << 1;
457 nmp->nm_retry = NFS_RETRANS;
458 nmp->nm_wsize = NFS_WSIZE;
459 nmp->nm_rsize = NFS_RSIZE;
460 bcopy((caddr_t)argp->fh, (caddr_t)&nmp->nm_fh, sizeof(nfsv2fh_t));
461 bcopy(hst, mp->mnt_stat.f_mntfromname, MNAMELEN);
462 bcopy(pth, mp->mnt_stat.f_mntonname, MNAMELEN);
463 nmp->nm_nam = nam;
464 nfs_decode_flags(argp, nmp);
465
466 /* Set up the sockets and per-host congestion */
467 nmp->nm_sotype = argp->sotype;
468 nmp->nm_soproto = argp->proto;
469 if (error = nfs_connect(nmp))
470 goto bad;
471
472 if (error = nfs_statfs(mp, &mp->mnt_stat, p))
473 goto bad;
474 /*
475 * A reference count is needed on the nfsnode representing the
476 * remote root. If this object is not persistent, then backward
477 * traversals of the mount point (i.e. "..") will not work if
478 * the nfsnode gets flushed out of the cache. Ufs does not have
479 * this problem, because one can identify root inodes by their
480 * number == ROOTINO (2).
481 */
482 if (error = nfs_nget(mp, &nmp->nm_fh, &np))
483 goto bad;
484 /*
485 * Unlock it, but keep the reference count.
486 */
487 nfs_unlock(NFSTOV(np));
488 *vpp = NFSTOV(np);
489
490 return (0);
491 bad:
492 nfs_disconnect(nmp);
493 FREE(nmp, M_NFSMNT);
494 m_freem(nam);
495 return (error);
496 }
497
498 /*
499 * unmount system call
500 */
501 nfs_unmount(mp, mntflags, p)
502 struct mount *mp;
503 int mntflags;
504 struct proc *p;
505 {
506 register struct nfsmount *nmp;
507 struct nfsnode *np;
508 struct vnode *vp;
509 int error, flags = 0;
510 extern int doforce;
511
512 if (mntflags & MNT_FORCE) {
513 if (!doforce || mp == rootfs)
514 return (EINVAL);
515 flags |= FORCECLOSE;
516 }
517 nmp = VFSTONFS(mp);
518 /*
519 * Clear out the buffer cache
520 */
521 mntflushbuf(mp, 0);
522 if (mntinvalbuf(mp))
523 return (EBUSY);
524 /*
525 * Goes something like this..
526 * - Check for activity on the root vnode (other than ourselves).
527 * - Call vflush() to clear out vnodes for this file system,
528 * except for the root vnode.
529 * - Decrement reference on the vnode representing remote root.
530 * - Close the socket
531 * - Free up the data structures
532 */
533 /*
534 * We need to decrement the ref. count on the nfsnode representing
535 * the remote root. See comment in mountnfs(). The VFS unmount()
536 * has done vput on this vnode, otherwise we would get deadlock!
537 */
538 if (error = nfs_nget(mp, &nmp->nm_fh, &np))
539 return(error);
540 vp = NFSTOV(np);
541 if (vp->v_usecount > 2) {
542 vput(vp);
543 return (EBUSY);
544 }
545 if (error = vflush(mp, vp, flags)) {
546 vput(vp);
547 return (error);
548 }
549 /*
550 * Get rid of two reference counts, and unlock it on the second.
551 */
552 vrele(vp);
553 vput(vp);
554 vgone(vp);
555 nfs_disconnect(nmp);
556 m_freem(nmp->nm_nam);
557 free((caddr_t)nmp, M_NFSMNT);
558 return (0);
559 }
560
561 /*
562 * Return root of a filesystem
563 */
564 nfs_root(mp, vpp)
565 struct mount *mp;
566 struct vnode **vpp;
567 {
568 register struct vnode *vp;
569 struct nfsmount *nmp;
570 struct nfsnode *np;
571 int error;
572 struct vattr va;
573 struct proc *p = curproc /* XXX */;
574
575 nmp = VFSTONFS(mp);
576 if (error = nfs_nget(mp, &nmp->nm_fh, &np))
577 return (error);
578 vp = NFSTOV(np);
579 if (error = nfs_getattr(vp, &va, p->p_ucred, p))
580 return (error);
581 vp->v_type = va.va_type;
582 vp->v_flag = VROOT;
583 *vpp = vp;
584 return (0);
585 }
586
587 extern int syncprt;
588
589 /*
590 * Flush out the buffer cache
591 */
592 /* ARGSUSED */
593 nfs_sync(mp, waitfor)
594 struct mount *mp;
595 int waitfor;
596 {
597 if (syncprt)
598 bufstats();
599 /*
600 * Force stale buffer cache information to be flushed.
601 */
602 mntflushbuf(mp, waitfor == MNT_WAIT ? B_SYNC : 0);
603 return (0);
604 }
605
606 /*
607 * At this point, this should never happen
608 */
609 /* ARGSUSED */
610 nfs_fhtovp(mp, fhp, vpp)
611 struct mount *mp;
612 struct fid *fhp;
613 struct vnode **vpp;
614 {
615
616 return (EINVAL);
617 }
618
619 /*
620 * Vnode pointer to File handle, should never happen either
621 */
622 /* ARGSUSED */
623 nfs_vptofh(vp, fhp)
624 struct vnode *vp;
625 struct fid *fhp;
626 {
627
628 return (EINVAL);
629 }
630
631 /*
632 * Vfs start routine, a no-op.
633 */
634 /* ARGSUSED */
635 nfs_start(mp, flags, p)
636 struct mount *mp;
637 int flags;
638 struct proc *p;
639 {
640
641 return (0);
642 }
643
644 /*
645 * Do operations associated with quotas, not supported
646 */
647 nfs_quotactl(mp, cmd, uid, arg, p)
648 struct mount *mp;
649 int cmd;
650 uid_t uid;
651 caddr_t arg;
652 struct proc *p;
653 {
654 #ifdef lint
655 mp = mp; cmd = cmd; uid = uid; arg = arg;
656 #endif /* lint */
657 return (EOPNOTSUPP);
658 }
659