}
} /*print_internet_address */
-
-
-/* run everywhere, checking locks */
-void
-afs_CheckLocks(void)
-{
- int i;
-
- afs_warn("Looking for locked data structures.\n");
- afs_warn("conn %p, volume %p, user %p, cell %p, server %p\n", &afs_xconn,
- &afs_xvolume, &afs_xuser, &afs_xcell, &afs_xserver);
- {
- struct vcache *tvc;
- AFS_STATCNT(afs_CheckLocks);
-
- for (i = 0; i < VCSIZE; i++) {
- for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
- if (tvc->f.states & CVInit) continue;
-#ifdef AFS_DARWIN80_ENV
- if (vnode_isinuse(AFSTOV(tvc), 0))
-#else
- if (VREFCOUNT(tvc))
-#endif
- afs_warn("Stat cache entry at %p is held\n", tvc);
- if (CheckLock(&tvc->lock))
- afs_warn("Stat entry at %p is locked\n", tvc);
- }
- }
- }
- {
- struct dcache *tdc;
- for (i = 0; i < afs_cacheFiles; i++) {
- tdc = afs_indexTable[i];
- if (tdc) {
- if (tdc->refCount)
- afs_warn("Disk entry %d at %p is held\n", i, tdc);
- }
- if (afs_indexFlags[i] & IFDataMod)
- afs_warn("Disk entry %d at %p has IFDataMod flag set.\n", i,
- tdc);
- }
- }
- {
- struct srvAddr *sa;
- struct server *ts;
- struct sa_conn_vector *tcv;
- for (i = 0; i < NSERVERS; i++) {
- for (ts = afs_servers[i]; ts; ts = ts->next) {
- if (ts->flags & SRVR_ISDOWN)
- afs_warn("Server entry %p is marked down\n", ts);
- for (sa = ts->addr; sa; sa = sa->next_sa) {
- for (tcv = sa->conns; tcv; tcv = tcv->next) {
- if (tcv->refCount)
- afs_warn("conn at %p (server %x) is held\n", tcv,
- sa->sa_ip);
- }
- }
- }
- }
- }
- {
- struct volume *tv;
- for (i = 0; i < NVOLS; i++) {
- for (tv = afs_volumes[i]; tv; tv = tv->next) {
- if (CheckLock(&tv->lock))
- afs_warn("volume at %p is locked\n", tv);
- if (tv->refCount)
- afs_warn("volume at %p is held\n", tv);
- }
- }
- }
- {
- struct unixuser *tu;
-
- for (i = 0; i < NUSERS; i++) {
- for (tu = afs_users[i]; tu; tu = tu->next) {
- if (CheckLock(&tu->lock))
- afs_warn("user at %p is locked\n", tu);
- if (tu->refCount)
- afs_warn("user at %lx is held\n", (unsigned long)tu);
- }
- }
- }
- afs_warn("Done.\n");
-}
-
-
int
afs_noop(void)
{
printf("\t%10d afs_ConnByHost\n", cmp->callInfo.C_afs_ConnByHost);
printf("\t%10d afs_ConnByMHosts\n", cmp->callInfo.C_afs_ConnByMHosts);
printf("\t%10d afs_Analyze\n", cmp->callInfo.C_afs_Analyze);
- printf("\t%10d afs_CheckLocks\n", cmp->callInfo.C_afs_CheckLocks);
printf("\t%10d CheckVLServer\n", cmp->callInfo.C_CheckVLServer);
printf("\t%10d afs_CheckCacheResets\n",
cmp->callInfo.C_afs_CheckCacheResets);