return 0;
}
+static void
+afs_freevfs(void)
+{
+ int i;
+ struct vcache *vc, *nvc;
+ extern struct vcache *afs_vhashT[VCSIZE];
+
+ afs_globalVFS = 0;
+
+ afs_shutdown();
+}
+
#if defined(AFS_SUN58_ENV)
int
afs_unmount(struct vfs *afsp, int flag, afs_ucred_t *credp)
AFS_RELE(rootvp);
#ifndef AFS_SUN58_ENV
- /* shutdown now, since afs_freevfs() will not be called */
- afs_globalVFS = 0;
- afs_shutdown();
+ /* shutdown now, since gafs_freevfs() will not be called */
+ afs_freevfs();
#endif /* !AFS_SUN58_ENV */
AFS_GUNLOCK();
#ifdef AFS_SUN58_ENV
void
-afs_freevfs(struct vfs *afsp)
+gafs_freevfs(struct vfs *afsp)
{
AFS_GLOCK();
- afs_globalVFS = 0;
- afs_shutdown();
+ afs_freevfs();
AFS_GUNLOCK();
}
int
afs_root(struct vfs *afsp, struct vnode **avpp)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
struct vcache *gvp;
struct proc *proc = ttoproc(curthread);
struct vnode *vp = afsp->vfs_vnodecovered;
}
}
if (tvp) {
- VN_HOLD(AFSTOV(tvp));
+ AFS_FAST_HOLD(tvp);
mutex_enter(&AFSTOV(tvp)->v_lock);
AFSTOV(tvp)->v_flag |= VROOT;
mutex_exit(&AFSTOV(tvp)->v_lock);
VFSNAME_SYNC, { .vfs_sync = afs_sync },
VFSNAME_VGET, { .vfs_vget = afs_vget },
VFSNAME_MOUNTROOT, { .vfs_mountroot = afs_mountroot },
- VFSNAME_FREEVFS, { .vfs_freevfs = afs_freevfs },
+ VFSNAME_FREEVFS, { .vfs_freevfs = gafs_freevfs },
NULL, NULL
};
struct vfsops *afs_vfsopsp;
VFSNAME_SYNC, afs_sync,
VFSNAME_VGET, afs_vget,
VFSNAME_MOUNTROOT, afs_mountroot,
- VFSNAME_FREEVFS, afs_freevfs,
+ VFSNAME_FREEVFS, gafs_freevfs,
NULL, NULL
};
struct vfsops *afs_vfsopsp;
afs_mountroot,
afs_swapvp,
#if defined(AFS_SUN58_ENV)
- afs_freevfs,
+ gafs_freevfs,
#endif
};
#endif
};
#endif
+#ifndef AFS_SUN511_ENV
static struct sysent afssysent = {
6,
0,
Afs_syscall
};
+#endif /* AFS_SUN511_ENV */
/* inter-module dependencies */
char _depends_on[] = "drv/ip drv/udp strmod/rpcmod";
* Info/Structs to link the afs module into the kernel
*/
extern struct mod_ops mod_fsops;
-extern struct mod_ops mod_syscallops;
static struct modlfs afsmodlfs = {
&mod_fsops,
#endif
};
+#ifdef AFS_SUN511_ENV
+
+extern struct modldrv afs_modldrv;
+
+#else /* AFS_SUN511_ENV */
+
+extern struct mod_ops mod_syscallops;
static struct modlsys afsmodlsys = {
&mod_syscallops,
"afs syscall interface",
* land here from sysent or sysent32
*/
-#if defined(AFS_SUN57_64BIT_ENV)
+# if defined(AFS_SUN57_64BIT_ENV)
extern struct mod_ops mod_syscallops32;
static struct modlsys afsmodlsys32 = {
"afs syscall interface(32 bit)",
&afssysent
};
-#endif
+# endif
+#endif /* !AFS_SUN511_ENV */
static struct modlinkage afs_modlinkage = {
MODREV_1,
+ (void *)&afsmodlfs,
+#ifdef AFS_SUN511_ENV
+ (void *)&afs_modldrv,
+#else
(void *)&afsmodlsys,
-#ifdef AFS_SUN57_64BIT_ENV
+# ifdef AFS_SUN57_64BIT_ENV
(void *)&afsmodlsys32,
-#endif
- (void *)&afsmodlfs,
+# endif
+#endif /* !AFS_SUN511_ENV */
NULL
};
#if defined(AFS_SUN55_ENV)
if ((!(mp = mod_find_by_filename("misc", "nfssrv"))
&& !(mp = mod_find_by_filename(NULL, NFSSRV))
- && !(mp = mod_find_by_filename(NULL, NFSSRV_V9))) || (mp
+ && !(mp = mod_find_by_filename(NULL, NFSSRV_V9))
+ && !(mp = mod_find_by_filename(NULL, NFSSRV_AMD64))) || (mp
&& !mp->
mod_installed))
{
#endif /* AFS_SUN52_ENV */
#endif /* AFS_SUN55_ENV */
#endif /* !AFS_NONFSTRANS */
-#if !defined(AFS_SUN58_ENV)
+
+#ifndef AFS_SUN511_ENV
+ /* syscall initialization stff */
+
+# if !defined(AFS_SUN58_ENV)
/*
* Re-read the /etc/name_to_sysnum file to make sure afs isn't added after
* reboot. Ideally we would like to call modctl_read_sysbinding_file() but
* proper slot entry and we also actually have to properly initialize the
* global sysent[AFS_SYSCALL] entry!
*/
-#ifdef AFS_SUN53_ENV
-#ifndef SYSBINDFILE
-#define SYSBINDFILE "/etc/name_to_sysnum"
-#endif /* SYSBINDFILE */
+# ifdef AFS_SUN53_ENV
+# ifndef SYSBINDFILE
+# define SYSBINDFILE "/etc/name_to_sysnum"
+# endif /* SYSBINDFILE */
read_binding_file(SYSBINDFILE, sb_hashtab);
-#else /* !AFS_SUN53_ENV */
+# else /* !AFS_SUN53_ENV */
read_binding_file(sysbind, sb_hashtab);
-#endif /* AFS_SUN53_ENV */
+# endif /* AFS_SUN53_ENV */
make_syscallname("afs", AFS_SYSCALL);
if (sysent[AFS_SYSCALL].sy_call == nosys) {
sysent[AFS_SYSCALL].sy_lock =
(krwlock_t *) kobj_zalloc(sizeof(krwlock_t), KM_SLEEP);
rw_init(sysent[AFS_SYSCALL].sy_lock, "afs_syscall",
-#ifdef AFS_SUN57_ENV
+# ifdef AFS_SUN57_ENV
RW_DEFAULT, NULL);
-#else /* !AFS_SUN57_ENV */
+# else /* !AFS_SUN57_ENV */
RW_DEFAULT, DEFAULT_WT);
-#endif /* AFS_SUN57_ENV */
+# endif /* AFS_SUN57_ENV */
}
}
-#endif /* !AFS_SUN58_ENV */
+# endif /* !AFS_SUN58_ENV */
+#endif /* !AFS_SUN511_ENV */
osi_Init(); /* initialize global lock, etc */