};
#ifndef ACL2_NPROC
+#if defined(AFS_SUN510_ENV)
+#define ACL2_NPROC 6
+#else
#define ACL2_NPROC 5
#endif
+#endif
struct afs_nfs_disp_tbl afs_rfs_disp_tbl[RFS_NPROC];
struct afs_nfs_disp_tbl afs_acl_disp_tbl[ACL2_NPROC];
}
#endif
-struct afs_nfs_disp_tbl afs_acl_disp_tbl[5] = {
+struct afs_nfs_disp_tbl afs_acl_disp_tbl[ACL2_NPROC] = {
{afs_nfs2_null},
{afs_acl2_getacl},
{afs_acl2_setacl},
#endif
#ifndef ACL3_NPROC
+#if defined(AFS_SUN510_ENV)
+#define ACL3_NPROC 4
+#else
#define ACL3_NPROC 3
#endif
+#endif
struct afs_nfs_disp_tbl afs_rfs3_disp_tbl[RFS3_NPROC];
struct afs_nfs_disp_tbl afs_acl3_disp_tbl[ACL3_NPROC];
}
#endif
-struct afs_nfs_disp_tbl afs_acl3_disp_tbl[3] = {
+struct afs_nfs_disp_tbl afs_acl3_disp_tbl[ACL3_NPROC] = {
{afs_nfs2_null},
{afs_acl3_getacl},
{afs_acl3_setacl},
afs_int32 vcachegen = 0;
unsigned int afs_paniconwarn = 0;
struct vcache *afs_vhashT[VCSIZE];
-struct afs_q afs_vhashTV[VCSIZE];
+struct vcache *afs_vhashTV[VCSIZE];
static struct afs_cbr *afs_cbrHashT[CBRSIZE];
afs_int32 afs_bulkStatsLost;
int afs_norefpanic = 0;
afs_FlushVCache(struct vcache *avc, int *slept)
{ /*afs_FlushVCache */
- afs_int32 i, code;
- struct vcache **uvc, *wvc;
+ afs_int32 i, code, j;
+ struct vcache **uvc, *wvc, **uvc2, *wvc2;
*slept = 0;
AFS_STATCNT(afs_FlushVCache);
}
/* remove entry from the volume hash table */
- QRemove(&avc->vhashq);
-
+ j = VCHashV(&avc->fid);
+ uvc2 = &afs_vhashTV[j];
+ for (wvc2 = *uvc2; wvc2; uvc2 = &wvc2->vhnext, wvc2 = *uvc2) {
+ if (avc == wvc2) {
+ *uvc2 = avc->vhnext;
+ avc->vhnext = (struct vcache *)NULL;
+ break;
+ }
+ }
+ if (!wvc || !wvc2)
+ osi_Panic("flushvcache"); /* not in correct hash bucket */
if (avc->mvid)
osi_FreeSmallSpace(avc->mvid);
avc->mvid = (struct VenusFid *)0;
if (((3 * afs_vcount) > nvnode) || (afs_vcount >= afs_maxvcount))
#endif
{
+ struct afs_q *tq, *uq;
int i;
char *panicstr;
osi_dnlc_purgedp(tvc); /* this may be overkill */
memset((char *)&(tvc->callsort), 0, sizeof(struct afs_q));
tvc->slocks = NULL;
- i = VCHash(afid);
- j = VCHashV(afid);
-
tvc->states &=~ CVInit;
afs_osi_Wakeup(&tvc->states);
- tvc->hnext = afs_vhashT[i];
- afs_vhashT[i] = tvc;
- QAdd(&afs_vhashTV[i], &tvc->vhashq);
-
- if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
- refpanic("NewVCache VLRU inconsistent");
- }
- QAdd(&VLRU, &tvc->vlruq); /* put in lruq */
- if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
- refpanic("NewVCache VLRU inconsistent2");
- }
- if (tvc->vlruq.next->prev != &(tvc->vlruq)) {
- refpanic("NewVCache VLRU inconsistent3");
- }
- if (tvc->vlruq.prev->next != &(tvc->vlruq)) {
- refpanic("NewVCache VLRU inconsistent4");
- }
- vcachegen++;
-
return tvc;
} /*afs_NewVCache */
#endif /* AFS_SGI62_ENV */
}
#endif
+
QInit(&VLRU);
- for(i = 0; i < VCSIZE; ++i)
- QInit(&afs_vhashTV[i]);
+
+
}
/*
afs_FreeAllAxs(&(tvc->Access));
}
- afs_vhashT[i] = 0;
+ afs_vhashT[i] = afs_vhashTV[i] = 0;
}
}
/*
RWLOCK_INIT(&afs_xvcache, "afs_xvcache");
LOCK_INIT(&afs_xvcb, "afs_xvcb");
QInit(&VLRU);
- for(i = 0; i < VCSIZE; ++i)
- QInit(&afs_vhashTV[i]);
+
}