[OpenAFS-devel] question about code in afs_dcache.c
aeneous@speakeasy.org
aeneous@speakeasy.org
Thu, 19 Apr 2001 18:41:37 -0400
>
> if (afs_discardDCList == NULLIDX && afs_freeDCList == NULLIDX) {
> while (1) {
> if (!setLocks) avc->states |= CDCLock;
> afs_GetDownD(5, (int*)0); /* just need slots */
> if (!setLocks) avc->states &= (~CDCLock);
> if (afs_discardDCList != NULLIDX || afs_freeDCList != NULLIDX)
> break;
> /* If we can't get space for 5 mins we give up and panic */
> if (++downDCount > 300)
> osi_Panic("getdcache");
> MReleaseWriteLock(&afs_xdcache);
> afs_osi_Wait(1000, 0, 0);
> goto RetryLookup;
> }
It's hard to tell without the CVS logs. I wish IBM had released those, too.
My guess, based on the indentation, is that the while() loop was added after
the main body of the code, and then the goto was added at a later time.
I'll bet 20 bucks. Any takers? Hopefully someone at IBM would look this up
in the logs for a share of the kitty.