/* Exported variables */
struct osi_dev cacheDev; /*Cache device */
afs_int32 cacheInfoModTime; /*Last time cache info modified */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_NBSD_ENV)
struct mount *afs_cacheVfsp = 0;
#elif defined(AFS_LINUX20_ENV)
struct super_block *afs_cacheSBp = 0;
else if (aVolumes > 32767)
aVolumes = 32767;
- tv = (struct volume *)afs_osi_Alloc(aVolumes * sizeof(struct volume));
+ tv = afs_osi_Alloc(aVolumes * sizeof(struct volume));
+ osi_Assert(tv != NULL);
for (i = 0; i < aVolumes - 1; i++)
tv[i].next = &tv[i + 1];
tv[aVolumes - 1].next = NULL;
if (code || !filevp)
return ENOENT;
{
-#if defined(AFS_SUN56_ENV)
+#if defined(AFS_SUN5_ENV)
struct statvfs64 st;
#elif defined(AFS_HPUX102_ENV)
struct k_statvfs st;
-#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX100_ENV) || defined(AFS_NBSD40_ENV)
+#elif defined(AFS_SGI_ENV) || defined(AFS_HPUX100_ENV) || defined(AFS_NBSD40_ENV)
struct statvfs st;
#elif defined(AFS_DARWIN80_ENV)
struct vfsstatfs st;
#else
struct statfs st;
-#endif /* SUN56 */
+#endif /* SUN5 */
#if defined(AFS_SGI_ENV)
#ifdef AFS_SGI65_ENV
if (afs_cacheVfsp && ((st = *(vfs_statfs(afs_cacheVfsp))),1))
#elif defined(AFS_FBSD80_ENV)
if (!VFS_STATFS(filevp->v_mount, &st))
+#elif defined(AFS_NBSD50_ENV)
+ if (!VFS_STATVFS(filevp->v_vfsp, &st))
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
if (!VFS_STATFS(filevp->v_mount, &st, osi_curproc()))
#else
AFS_RWLOCK_INIT(&afs_icl_lock, "afs_icl_lock");
AFS_RWLOCK_INIT(&afs_xinterface, "afs_xinterface");
LOCK_INIT(&afs_puttofileLock, "afs_puttofileLock");
-#ifndef AFS_FBSD_ENV
+#ifndef AFS_PRIVATE_OSI_ALLOCSPACES
LOCK_INIT(&osi_fsplock, "osi_fsplock");
LOCK_INIT(&osi_flplock, "osi_flplock");
#endif
afs_resourceinit_flag = 1;
for (i = 0; i < NFENTRIES; i++)
fvTable[i] = 0;
- for (i = 0; i < MAXNUMSYSNAMES; i++)
+ for (i = 0; i < MAXNUMSYSNAMES; i++) {
afs_sysnamelist[i] = afs_osi_Alloc(MAXSYSNAME);
+ osi_Assert(afs_sysnamelist[i] != NULL);
+ }
afs_sysname = afs_sysnamelist[0];
strcpy(afs_sysname, SYS_NAME);
afs_sysnamecount = 1;
void
shutdown_vnodeops(void)
{
-#if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV)
- struct buf *afs_bread_freebp = 0;
-#endif
-
-
AFS_STATCNT(shutdown_vnodeops);
if (afs_cold_shutdown) {
#ifndef AFS_SUN5_ENV /* XXX */
#ifndef AFS_LINUX20_ENV
afs_rd_stash_i = 0;
#endif
-#if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV)
- afs_bread_freebp = 0;
-#endif
shutdown_mariner();
}
}
shutdown_server(void)
{
int i;
- struct afs_conn *tc, *ntc;
struct afs_cbr *tcbrp, *tbrp;
struct srvAddr *sa;
next = ts->next;
for (sa = ts->addr; sa; sa = sa->next_sa) {
if (sa->conns) {
- /*
- * Free all server's connection structs
- */
- tc = sa->conns;
- while (tc) {
- ntc = tc->next;
-#if 0
- /* we should destroy all connections
- when shutting down Rx, not here */
- AFS_GUNLOCK();
- rx_DestroyConnection(tc->id);
- AFS_GLOCK();
-#endif
- afs_osi_Free(tc, sizeof(struct afs_conn));
- tc = ntc;
- }
+ /* afs_ReleaseConns has been updated to
+ * defer rx_DestroyConnection to Rx
+ * shutdown, as most recently was done
+ * here */
+ afs_ReleaseConns(sa->conns);
}
}
for (tcbrp = ts->cbrs; tcbrp; tcbrp = tbrp) {