From 481b170d88e1821bd4d498e3c75e514facbff0a5 Mon Sep 17 00:00:00 2001 From: Hartmut Reuter Date: Thu, 19 Aug 2004 06:42:20 +0000 Subject: [PATCH] aix-5-updates-20040819 updates to aix 5 code since last patches --- src/afs/AIX/osi_config.c | 9 ++++++++- src/afs/AIX/osi_inode.c | 2 +- src/afs/AIX/osi_vfsops.c | 6 ++++++ src/afs/afs_call.c | 7 +++++++ src/afs/afs_daemons.c | 2 +- src/afs/afs_vcache.c | 6 +++--- src/rx/AIX/rx_knet.c | 1 + 7 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/afs/AIX/osi_config.c b/src/afs/AIX/osi_config.c index c1ebc3fcaf..edd80051cd 100644 --- a/src/afs/AIX/osi_config.c +++ b/src/afs/AIX/osi_config.c @@ -147,7 +147,14 @@ afs_config(cmd, uiop) */ if (err == ENOENT) err = 0; - else if (!err) { +#ifndef AFS_AIX51_ENV + else +#endif + if (!err) { +#ifdef AFS_AIX51_ENV + if (err = unpin(&afs_callout_lock)) + err = 0; +#endif if (err = unpincode(afs_config)) err = 0; diff --git a/src/afs/AIX/osi_inode.c b/src/afs/AIX/osi_inode.c index 921802d286..39bcdce691 100644 --- a/src/afs/AIX/osi_inode.c +++ b/src/afs/AIX/osi_inode.c @@ -236,13 +236,13 @@ igetinode(dev, vfsp, inode, vpp, perror) ip = 0; goto out; } - IREAD_UNLOCK(ip); if (vpp) { if (nvfsp) *vpp = ip->i_gnode.gn_vnode; else setuerror(iptovp(vfsp, ip, vpp)); } + IREAD_UNLOCK(ip); out: return ip; } diff --git a/src/afs/AIX/osi_vfsops.c b/src/afs/AIX/osi_vfsops.c index 10a7edfe0d..ad058f7519 100644 --- a/src/afs/AIX/osi_vfsops.c +++ b/src/afs/AIX/osi_vfsops.c @@ -34,6 +34,7 @@ extern struct afs_exporter *afs_nfsexporter; struct vfs *afs_globalVFS = 0; struct vcache *afs_globalVp = 0; +extern int afs_cold_shutdown; static int afs_root_nolock(struct vfs *afsp, struct vnode **avpp); @@ -81,6 +82,10 @@ afs_mount(afsp, path, data) afsp->vfs_mntdover->v_mvfsp = afsp; afsp->vfs_mdata->vmt_flags |= MNT_REMOTE; +#ifdef AFS_AIX51_ENV + afsp->vfs_count = 1; + afsp->vfs_mntd->v_count = 1; +#endif #ifdef AFS_AIX_IAUTH_ENV if (afs_iauth_register() < 0) afs_warn("Can't register AFS iauth interface.\n"); @@ -97,6 +102,7 @@ afs_unmount(struct vfs *afsp, int flag) AFS_STATCNT(afs_unmount); afs_globalVFS = 0; + afs_cold_shutdown = 1; afs_shutdown(); AFS_VFSUNLOCK(); diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index 6b1eeeb1c9..c801c04d23 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -1528,6 +1528,9 @@ afs_shutdown(void) afs_termState = AFSOP_STOP_RXCALLBACK; rx_WakeupServerProcs(); +#ifdef AFS_AIX51_ENV + shutdown_rxkernel(); +#endif /* shutdown_rxkernel(); */ while (afs_termState == AFSOP_STOP_RXCALLBACK) afs_osi_Sleep(&afs_termState); @@ -1598,7 +1601,11 @@ afs_shutdown(void) shutdown_rx(); afs_shutdown_BKG(); shutdown_bufferpackage(); +#endif +#ifdef AFS_AIX51_ENV shutdown_daemons(); +#endif +#ifdef notdef shutdown_cache(); shutdown_osi(); shutdown_osinet(); diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c index 658bd4a154..eebb5e8243 100644 --- a/src/afs/afs_daemons.c +++ b/src/afs/afs_daemons.c @@ -1338,7 +1338,7 @@ shutdown_daemons(void) #ifdef AFS_AIX41_ENV lock_free(&afs_asyncbuf_lock); unpin(&afs_asyncbuf, sizeof(struct buf *)); - pin(&afs_asyncbuf_cv, sizeof(afs_int32)); + unpin(&afs_asyncbuf_cv, sizeof(afs_int32)); #else /* AFS_AIX41_ENV */ afs_busyq = NULL; afs_biodcnt = 0; diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 31f5b719ef..87c467f16b 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -3010,12 +3010,12 @@ shutdown_vcache(void) } afs_cbrSpace = 0; -#if !defined(AFS_OSF_ENV) - afs_osi_Free(Initial_freeVCList, afs_cacheStats * sizeof(struct vcache)); -#endif #ifdef KERNEL_HAVE_PIN unpin(Initial_freeVCList, afs_cacheStats * sizeof(struct vcache)); #endif +#if !defined(AFS_OSF_ENV) + afs_osi_Free(Initial_freeVCList, afs_cacheStats * sizeof(struct vcache)); +#endif #if !defined(AFS_OSF_ENV) freeVCList = Initial_freeVCList = 0; #endif diff --git a/src/rx/AIX/rx_knet.c b/src/rx/AIX/rx_knet.c index e4e30f7052..6ccd1e30c9 100644 --- a/src/rx/AIX/rx_knet.c +++ b/src/rx/AIX/rx_knet.c @@ -322,6 +322,7 @@ shutdown_rxkernel(void) rxk_portRocks[i] = NULL; } } + del_input_type(0xdead); } }