This is mostly a rewrite of src/afs/afs_cell.c, and associated changes
[openafs.git] / src / afs / IRIX / osi_vfsops.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * osi_vfsops.c for IRIX
12  */
13 #include <afsconfig.h>
14 #include "../afs/param.h"
15
16 RCSID("$Header$");
17
18 #include "../afs/sysincludes.h" /* Standard vendor system headers */
19 #include "../afs/afsincludes.h" /* Afs-based standard headers */
20 #include "../afs/afs_stats.h"   /* statistics stuff */
21 #include "sys/syssgi.h"
22
23
24 struct vfs *afs_globalVFS = 0;
25 struct vcache *afs_globalVp = 0;
26
27 #ifdef AFS_SGI_VNODE_GLUE
28 #include <sys/invent.h>
29 int afs_is_numa_arch;
30 mutex_t afs_init_kern_lock;
31 #endif
32
33
34 #define SYS_setgroups SGI_SETGROUPS
35
36 int (*nfs_rfsdisptab_v2)() = NULL;
37
38 int afs_fstype;
39 lock_t afs_rxlock;
40
41 #include "sys/mload.h"
42 char *Afs_mversion = M_VERSION;
43
44 extern int (*setgroupsp)(int, gid_t *);
45 extern struct afs_lock afs_xvcache;
46 extern int idbg_afsuser();
47 extern void afs_mpservice(void *);
48
49 /*
50  * AFS fs initialization - we also plug system calls here
51  */
52 #define NewSystemCall(n,f,a) \
53         syscallsw[ABI_IRIX5].sc_sysent[(n)-1000].sy_narg = a; \
54         syscallsw[ABI_IRIX5].sc_sysent[(n)-1000].sy_call = f; \
55         syscallsw[ABI_IRIX5].sc_sysent[(n)-1000].sy_flags = 0;
56 extern struct vfsops Afs_vfsops, *afs_vfsopsp;
57 extern struct vnodeops Afs_vnodeops, *afs_vnodeopsp;
58 extern void (*afsidestroyp)(struct inode *);
59 extern void (*afsdptoipp)(struct efs_dinode *, struct inode *);
60 extern void (*afsiptodpp)(struct inode *, struct efs_dinode *);
61 extern void afsidestroy(struct inode *);
62 extern void afsdptoip(struct efs_dinode *, struct inode *);
63 extern void afsiptodp(struct inode *, struct efs_dinode *);
64 extern int (*idbg_prafsnodep)(vnode_t *);
65 extern int (*idbg_afsvfslistp)(void);
66 extern int idbg_prafsnode(vnode_t *);
67 extern int idbg_afsvfslist(void);
68
69
70 int
71 Afs_init(struct vfssw *vswp, int fstype)
72 {
73     extern int Afs_syscall(), Afs_xsetgroups(), afs_pioctl(), afs_setpag();
74     extern int icreate(), iopen(), iinc(), idec();
75 #ifdef AFS_SGI_XFS_IOPS_ENV
76     extern int iopen64();
77 #else
78     extern int iread(), iwrite();
79 #endif
80
81     AFS_STATCNT(afsinit);
82     osi_Init();
83     afs_fstype = fstype;
84
85 #ifdef AFS_SGI_VNODE_GLUE
86     /* Synchronize doing NUMA test. */
87     mutex_init(&afs_init_kern_lock, MUTEX_DEFAULT, "init_kern_lock");
88 #endif
89     /*
90      * set up pointers from main kernel into us
91      */
92     afs_vnodeopsp = &Afs_vnodeops;
93     afs_vfsopsp = &Afs_vfsops;
94     afsidestroyp = afsidestroy;
95     afsiptodpp = afsiptodp;
96     afsdptoipp = afsdptoip;
97     idbg_prafsnodep = idbg_prafsnode;
98     idbg_afsvfslistp = idbg_afsvfslist;
99     NewSystemCall (AFS_SYSCALL, Afs_syscall, 6);
100     NewSystemCall (AFS_PIOCTL, afs_pioctl, 4);
101     NewSystemCall (AFS_SETPAG, afs_setpag, 0);
102     NewSystemCall (AFS_IOPEN, iopen, 3);
103     NewSystemCall (AFS_ICREATE, icreate, 6);
104     NewSystemCall (AFS_IINC, iinc, 3);
105     NewSystemCall (AFS_IDEC, idec, 3);
106 #ifdef AFS_SGI_XFS_IOPS_ENV
107     NewSystemCall (AFS_IOPEN64, iopen64, 4);
108 #else
109     NewSystemCall (AFS_IREAD, iread, 6);
110     NewSystemCall (AFS_IWRITE, iwrite, 6);
111 #endif
112
113     /* last replace these */
114     setgroupsp = Afs_xsetgroups;
115
116     idbg_addfunc("afsuser", idbg_afsuser);
117     return (0);
118 }
119
120
121 extern int afs_mount(), afs_unmount(), afs_root(), afs_statfs();
122 #ifdef AFS_SGI65_ENV
123 extern int afs_sync(OSI_VFS_DECL(afsp), int flags, struct cred *cr);
124 #else
125 extern int afs_sync(OSI_VFS_DECL(afsp), short flags, struct cred *cr);
126 #endif
127 extern int afs_vget(OSI_VFS_DECL(afsp), vnode_t **vpp, struct fid *afidp);
128 #ifdef MP
129 struct vfsops afs_lockedvfsops =
130 #else
131 struct vfsops Afs_vfsops =
132 #endif
133 {
134 #ifdef AFS_SGI64_ENV
135 #ifdef AFS_SGI65_ENV
136     BHV_IDENTITY_INIT_POSITION(VFS_POSITION_BASE),
137 #else
138     VFS_POSITION_BASE,
139 #endif
140 #endif
141     afs_mount,
142 #ifdef AFS_SGI64_ENV
143     fs_nosys, /* rootinit */
144     fs_nosys, /* mntupdate */
145     fs_dounmount,
146 #endif
147     afs_unmount,
148     afs_root,
149     afs_statfs,
150     afs_sync,
151     afs_vget,
152     fs_nosys, /* mountroot */
153 #ifdef AFS_SGI65_ENV
154     fs_nosys,   /* realvfsops */
155     fs_import,  /* import */
156     fs_nosys,   /* quotactl */
157 #else
158     fs_nosys, /* swapvp */
159 #endif
160 };
161 extern struct afs_q VLRU;                       /*vcache LRU*/
162
163 #ifdef AFS_SGI64_ENV
164 static bhv_desc_t afs_vfs_bhv;
165 #endif
166 afs_mount(struct vfs *afsp, vnode_t *mvp, struct mounta *uap,
167 #ifdef AFS_SGI65_ENV
168           char *attrs,
169 #endif
170           cred_t *cr)
171 {
172     AFS_STATCNT(afs_mount);
173
174     if (!suser())
175         return EPERM;
176
177     if (mvp->v_type != VDIR)
178         return ENOTDIR;
179
180     if (afs_globalVFS) { /* Don't allow remounts. */
181         return EBUSY;
182     }
183
184     afs_globalVFS = afsp;
185     afsp->vfs_bsize = 8192;
186     afsp->vfs_fsid.val[0] = AFS_VFSMAGIC; /* magic */
187     afsp->vfs_fsid.val[1] = afs_fstype; 
188 #ifdef AFS_SGI64_ENV
189     vfs_insertbhv(afsp, &afs_vfs_bhv, &Afs_vfsops, &afs_vfs_bhv);
190 #else
191     afsp->vfs_data = NULL;
192 #endif
193     afsp->vfs_fstype = afs_fstype;
194     afsp->vfs_dev = 0xbabebabe; /* XXX this should be unique */
195
196 #ifndef AFS_NONFSTRANS
197     if (nfs_rfsdisptab_v2)
198         afs_xlatorinit_v2(nfs_rfsdisptab_v2);
199     afs_xlatorinit_v3();
200 #endif
201     return 0;
202 }
203
204 afs_unmount(OSI_VFS_ARG(afsp), flags, cr)
205 OSI_VFS_DECL(afsp);
206 int flags;
207 cred_t *cr;
208 {
209     extern int afs_afs_cold_shutdown;
210     struct vcache *tvc;
211     vnode_t *vp, *rootvp = NULL;
212     register struct afs_q *tq;
213     struct afs_q *uq;
214     int error, fv_slept;
215     OSI_VFS_CONVERT(afsp)
216
217     AFS_STATCNT(afs_unmount);
218
219     if (!suser())
220         return EPERM;
221
222     /*
223      * flush all pages from inactive vnodes - return
224      * EBUSY if any still in use
225      */
226     ObtainWriteLock(&afs_xvcache,172);
227     for (tq = VLRU.prev; tq != &VLRU; tq = uq) {
228         tvc = QTOV(tq);
229         uq = QPrev(tq);
230         vp = (vnode_t *)tvc;
231         if (error = afs_FlushVCache(tvc, &fv_slept))
232                 if (vp->v_flag & VROOT) {
233                         rootvp = vp;
234                         continue;
235                 } else {
236                         ReleaseWriteLock(&afs_xvcache);
237                         return error;
238                 }
239     }
240
241     /*
242      * rootvp gets lots of ref counts
243      */
244     if (rootvp) {
245         tvc = VTOAFS(rootvp);
246         if (tvc->opens || CheckLock(&tvc->lock) || LockWaiters(&tvc->lock)) {
247             ReleaseWriteLock(&afs_xvcache);
248             return EBUSY;
249         }
250         ReleaseWriteLock(&afs_xvcache);
251         rootvp->v_count = 1;
252         AFS_RELE(rootvp);
253         ObtainWriteLock(&afs_xvcache,173);
254         afs_FlushVCache(tvc, &fv_slept);
255     }
256     ReleaseWriteLock(&afs_xvcache);
257     afs_globalVFS = 0;
258     afs_shutdown();
259 #ifdef AFS_SGI65_ENV
260     VFS_REMOVEBHV(afsp, &afs_vfs_bhv);
261 #endif
262     return 0;
263 }
264
265
266
267 afs_root (OSI_VFS_ARG(afsp), avpp)
268     OSI_VFS_DECL(afsp);
269     struct vnode **avpp;
270 {
271     register afs_int32 code = 0;
272     struct vrequest treq;
273     register struct vcache *tvp=0;
274     OSI_VFS_CONVERT(afsp)
275
276     AFS_STATCNT(afs_root);
277     if (afs_globalVp && (afs_globalVp->states & CStatd)) {
278         tvp = afs_globalVp;
279     } else {
280         if (afs_globalVp) {
281             afs_PutVCache(afs_globalVp);
282             afs_globalVp = NULL;
283         }
284
285         if (!(code = afs_InitReq(&treq, OSI_GET_CURRENT_CRED())) &&
286             !(code = afs_CheckInit())) {
287             tvp = afs_GetVCache(&afs_rootFid, &treq, NULL, NULL);
288             /* we really want this to stay around */
289             if (tvp) {
290                 afs_globalVp = tvp;
291             } else
292                 code = ENOENT;
293         }
294     }
295     if (tvp) {
296         int s;
297         VN_HOLD(AFSTOV(tvp));
298         s = VN_LOCK(AFSTOV(tvp));
299         AFSTOV(tvp)->v_flag |= VROOT;   
300         VN_UNLOCK(AFSTOV(tvp), s);
301
302         afs_globalVFS = afsp;
303         *avpp = AFSTOV(tvp);
304     }
305
306     afs_Trace2(afs_iclSetp, CM_TRACE_VFSROOT, ICL_TYPE_POINTER, *avpp,
307                ICL_TYPE_INT32, code);
308     return code;
309 }
310
311 afs_statfs(OSI_VFS_ARG(afsp), abp, avp)
312 OSI_VFS_DECL(afsp);
313 struct statvfs *abp;
314 struct vnode *avp; /* unused */
315 {
316     OSI_VFS_CONVERT(afsp)
317
318         AFS_STATCNT(afs_statfs);
319         abp->f_bsize = afsp->vfs_bsize;
320         abp->f_frsize = afsp->vfs_bsize;
321         /* Fake a high number below to satisfy programs that use the statfs
322          * call to make sure that there's enough space in the device partition
323          * before storing something there.
324          */
325         abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
326             abp->f_ffree  = abp->f_favail = 900000;
327
328         abp->f_fsid = AFS_VFSMAGIC; /* magic */
329         strcpy(abp->f_basetype, AFS_MOUNT_AFS);
330         abp->f_flag = 0;
331         abp->f_namemax = 256;
332         return 0;
333 }
334
335
336
337 /*
338  * sync's responsibilities include pushing back DELWRI pages
339  * Things to watch out for:
340  *      1) don't want to hold off new vnodes in the file system
341  *              while pushing back pages
342  *      2) since we can deal with un-referenced vndoes need to watch
343  *              races with folks who recycle vnodes
344  * Flags:
345  *      SYNC_BDFLUSH - do NOT sleep waiting for an inode - also, when
346  *                      when pushing DELWRI - only push old ones.
347  *      SYNC_PDFLUSH - push v_dpages.
348  *      SYNC_ATTR    - sync attributes - note that ordering considerations
349  *                      dictate that we also flush dirty pages
350  *      SYNC_WAIT    - do synchronouse writes - inode & delwri
351  *      SYNC_NOWAIT  - start delayed writes.
352  *      SYNC_DELWRI  - look at inodes w/ delwri pages. Other flags
353  *                      decide how to deal with them.
354  *      SYNC_CLOSE   - flush delwri and invalidate others.
355  *      SYNC_FSDATA  - push fs data (e.g. superblocks)
356  */
357
358 extern afs_int32 vcachegen;
359 #define PREEMPT_MASK    0x7f
360 #ifdef AFS_SGI64_ENV
361 #define PREEMPT()
362 #endif
363
364 int
365 afs_sync(OSI_VFS_DECL(afsp),
366 #ifdef AFS_SGI65_ENV
367          int flags,
368 #else
369          short flags,
370 #endif
371          struct cred *cr)
372 {
373     /* Why enable the vfs sync operation?? */
374         int error, lasterr, preempt;
375         struct vcache *tvc;
376         struct vnode *vp;
377         afs_uint32 lvcachegen;
378         register struct afs_q *tq;
379         struct afs_q *uq;
380         int s;
381         OSI_VFS_CONVERT(afsp)
382
383         error = lasterr = 0;
384         /*
385          * if not interested in vnodes, skip all this
386          */
387 #ifdef AFS_SGI61_ENV
388         if ((flags & (SYNC_CLOSE|SYNC_DELWRI|SYNC_PDFLUSH)) == 0)
389                 goto end;
390 #else /* AFS_SGI61_ENV */
391         if ((flags & (SYNC_CLOSE|SYNC_DELWRI|SYNC_ATTR)) == 0)
392                 goto end;
393 #endif /* AFS_SGI61_ENV */
394 loop:
395         ObtainReadLock(&afs_xvcache);
396         for (tq = VLRU.prev; tq != &VLRU; tq = uq) {
397                 tvc = QTOV(tq);
398                 uq = QPrev(tq);
399                 vp = (vnode_t *)tvc;
400                 /*
401                  * Since we push all dirty pages on last close/VOP_INACTIVE
402                  * we are only concerned with vnodes with
403                  * active reference counts.
404                  */
405                 s = VN_LOCK(vp);
406                 if (vp->v_count == 0) {
407                         VN_UNLOCK(vp, s);
408                         continue;
409                 }
410                 if ((flags & SYNC_CLOSE) == 0 && !AFS_VN_DIRTY(vp)) {
411                         VN_UNLOCK(vp, s);
412                         continue;
413                 }
414                 
415                 /*
416                  * ignore vnodes which need no flushing
417                  */
418                 if (flags & SYNC_DELWRI) {
419                     if (!AFS_VN_DIRTY(vp)) {
420                         VN_UNLOCK(vp, s);
421                         continue;
422                     }
423                 }
424 #ifdef AFS_SGI61_ENV
425                 else if (flags & SYNC_PDFLUSH) {
426                     if (!VN_GET_DPAGES(vp)) {
427                         VN_UNLOCK(vp, s);
428                         continue;
429                     }
430                 }
431 #endif /* AFS_SGI61_ENV */
432
433                 vp->v_count++;
434                 VN_UNLOCK(vp, s);
435                 lvcachegen = vcachegen;
436                 ReleaseReadLock(&afs_xvcache);
437
438                 /*
439                  * Try to lock rwlock without sleeping.  If we can't, we must
440                  * sleep for rwlock.
441                  */
442                 if (afs_rwlock_nowait(vp, 1) == 0) {
443 #ifdef AFS_SGI61_ENV
444                         if (flags & (SYNC_BDFLUSH | SYNC_PDFLUSH))
445 #else /* AFS_SGI61_ENV */
446                         if (flags & SYNC_BDFLUSH)
447 #endif /* AFS_SGI61_ENV */
448                             {
449                                 AFS_RELE(vp);
450                                 ObtainReadLock(&afs_xvcache);
451                                 if (vcachegen != lvcachegen) {
452                                         ReleaseReadLock(&afs_xvcache);
453                                         goto loop;
454                                 }
455                                 continue;
456                             }
457                         AFS_RWLOCK(vp, VRWLOCK_WRITE);
458                 }
459
460                 AFS_GUNLOCK();
461                 if (flags & SYNC_CLOSE) {
462                     PFLUSHINVALVP(vp, (off_t)0, (off_t)tvc->m.Length);
463                 }
464 #ifdef AFS_SGI61_ENV
465                 else if (flags & SYNC_PDFLUSH) {
466                         if (VN_GET_DPAGES(vp)) {
467                                 pdflush(vp, B_ASYNC);
468                         }
469                 }
470 #endif /* AFS_SGI61_ENV */
471
472
473                 if ((flags & SYNC_DELWRI) && AFS_VN_DIRTY(vp)) {
474 #ifdef AFS_SGI61_ENV
475                         PFLUSHVP(vp, (off_t)tvc->m.Length,
476                                  (flags & SYNC_WAIT) ? 0 : B_ASYNC, error);
477 #else /* AFS_SGI61_ENV */
478                         if (flags & SYNC_WAIT)
479                             /* push all and wait */
480                             PFLUSHVP(vp, (off_t)tvc->m.Length,
481                                      (off_t)0, error);
482                         else if (flags & SYNC_BDFLUSH) {
483                             /* push oldest */
484                             error = pdflush(vp, B_ASYNC);
485                         }
486                         else {
487                             /* push all but don't wait */
488                             PFLUSHVP(vp, (off_t)tvc->m.Length,
489                                      (off_t)B_ASYNC, error);
490                         }
491 #endif /* AFS_SGI61_ENV */
492                 }
493
494                 /*
495                  * Release vp, check error and whether to preempt, and if
496                  * we let go of xvcache lock and someone has changed the
497                  * VLRU, restart the loop
498                  */
499                 AFS_GLOCK();
500                 AFS_RWUNLOCK(vp, VRWLOCK_WRITE);
501                 AFS_RELE(vp);
502                 if (error)
503                         lasterr = error;
504                 if ((++preempt & PREEMPT_MASK) == 0) {
505                         AFS_GUNLOCK();
506                         PREEMPT();
507                         AFS_GLOCK();
508                 }
509                 ObtainReadLock(&afs_xvcache);
510                 if (vcachegen != lvcachegen) {
511                         ReleaseReadLock(&afs_xvcache);
512                         goto loop;
513                 }
514         }
515         ReleaseReadLock(&afs_xvcache);
516 end:
517         return lasterr;
518 }
519
520
521 afs_vget(OSI_VFS_DECL(afsp), vnode_t **avcp, struct fid *fidp)
522 {
523     struct VenusFid vfid;
524     struct vrequest treq;
525     register struct cell *tcell;
526     register afs_int32 code = 0;
527     afs_int32 ret;
528
529 #if defined(AFS_SGI64_ENV) && defined(CKPT) && !defined(_R5000_CVT_WAR)
530     afs_fid2_t *afid2;
531 #endif    
532
533     OSI_VFS_CONVERT(afsp)
534
535     AFS_STATCNT(afs_vget);
536
537     *avcp = NULL;
538
539 #if defined(AFS_SGI64_ENV) && defined(CKPT) && !defined(_R5000_CVT_WAR)
540     afid2 = (afs_fid2_t*)fidp;
541     if (afid2->af_len == sizeof(afs_fid2_t) - sizeof(afid2->af_len)) {
542         /* It's a checkpoint restart fid. */
543         tcell = afs_GetCellByIndex(afid2->af_cell, READ_LOCK);
544         if (!tcell) {
545             code = ENOENT;
546             goto out;
547         }
548         vfid.Cell = tcell->cellNum;
549         afs_PutCell(tcell, READ_LOCK);
550         vfid.Fid.Volume = afid2->af_volid;
551         vfid.Fid.Vnode = afid2->af_vno;
552         vfid.Fid.Unique = afid2->af_uniq;
553
554         if (code = afs_InitReq(&treq, OSI_GET_CURRENT_CRED()))
555             goto out;
556         *avcp = (vnode_t*) afs_GetVCache(&vfid, &treq, NULL, (struct vcache*)0);
557         if (! *avcp) {
558             code = ENOENT;
559         }
560         goto out;
561     }
562 #endif
563
564     if (code = afs_InitReq(&treq, OSI_GET_CURRENT_CRED())) goto out;
565     code = afs_osi_vget((struct vcache**)avcp, fidp, &treq);
566
567  out:
568     afs_Trace3(afs_iclSetp, CM_TRACE_VGET, ICL_TYPE_POINTER, *avcp,
569                ICL_TYPE_INT32, treq.uid, ICL_TYPE_FID, &vfid);
570     code = afs_CheckCode(code, &treq, 42);
571     return code;
572 }
573
574
575 #ifdef MP /* locked versions of vfs operations. */
576
577 /* wrappers for vfs calls */
578 #ifdef AFS_SGI64_ENV
579 #define AFS_MP_VFS_ARG(A) bhv_desc_t A
580 #else
581 #define AFS_MP_VFS_ARG(A) struct vfs A
582 #endif
583
584 int mp_afs_mount(struct vfs *a, struct vnode *b, struct mounta *c,
585 #ifdef AFS_SGI65_ENV
586                  char *d,
587 #endif
588                  struct cred *e)
589 {
590         int rv;
591         AFS_GLOCK();
592         rv = afs_lockedvfsops.vfs_mount(a, b, c, d
593 #ifdef AFS_SGI65_ENV
594                                         , e
595 #endif
596                                         );
597         AFS_GUNLOCK();
598         return rv;
599 }
600
601 int mp_afs_unmount(AFS_MP_VFS_ARG(*a), int b, struct cred *c)
602 {
603         int rv;
604         AFS_GLOCK();
605         rv = afs_lockedvfsops.vfs_unmount(a, b, c);
606         AFS_GUNLOCK();
607         return rv;
608 }
609
610 int mp_afs_root(AFS_MP_VFS_ARG(*a), struct vnode **b)
611 {
612         int rv;
613         AFS_GLOCK();
614         rv = afs_lockedvfsops.vfs_root(a, b);
615         AFS_GUNLOCK();
616         return rv;
617 }
618
619 int mp_afs_statvfs(AFS_MP_VFS_ARG(*a), struct statvfs *b, struct vnode *c)
620 {
621         int rv;
622         AFS_GLOCK();
623         rv = afs_lockedvfsops.vfs_statvfs(a, b, c);
624         AFS_GUNLOCK();
625         return rv;
626 }
627 int mp_afs_sync(AFS_MP_VFS_ARG(*a),
628 #ifdef AFS_SGI65_ENV
629                 int b,
630 #else
631                 short b,
632 #endif
633                 struct cred *c)
634 {
635         int rv;
636         AFS_GLOCK();
637         rv = afs_lockedvfsops.vfs_sync(a, b, c);
638         AFS_GUNLOCK();
639         return rv;
640 }
641 int mp_afs_vget(AFS_MP_VFS_ARG(*a), struct vnode **b, struct fid *c)
642 {
643         int rv;
644         AFS_GLOCK();
645         rv = afs_lockedvfsops.vfs_vget(a, b, c);
646         AFS_GUNLOCK();
647         return rv;
648 }
649
650 struct vfsops Afs_vfsops = {
651 #ifdef AFS_SGI64_ENV
652 #ifdef AFS_SGI65_ENV
653     BHV_IDENTITY_INIT_POSITION(VFS_POSITION_BASE),
654 #else
655     VFS_POSITION_BASE,
656 #endif
657 #endif
658     mp_afs_mount,
659 #ifdef AFS_SGI64_ENV
660     fs_nosys, /* rootinit */
661     fs_nosys, /* mntupdate */
662     fs_dounmount,
663 #endif
664     mp_afs_unmount,
665     mp_afs_root,
666     mp_afs_statvfs,
667     mp_afs_sync,
668     mp_afs_vget,
669     fs_nosys, /* mountroot */
670 #ifdef AFS_SGI65_ENV
671     fs_nosys,   /* realvfsops */
672     fs_import,  /* import */
673     fs_nosys,   /* quotactl */
674 #else
675     fs_nosys, /* swapvp */
676 #endif
677 };
678
679 #endif /* MP */