[OpenAFS-devel] question about code in afs_dcache.c

Jim Rees rees@umich.edu
Thu, 19 Apr 2001 19:04:49 -0400


  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.

You win.  In Transarc afs 3.2, there was no loop.  It called afs_GetDownD
once, and if that didn't help, it did a panic.  In 3.3 the while loop was
added, but the loop didn't seem to do anything because it still called panic
if afs_GetDownD didn't free up a slot.

In 3.4 a call to afs_osi_Wait was added to the loop, and panic was only
called if the loop went around 300 times.

In 3.5 the afs_discardDCList and goto were added, and the wait was removed.
OpenAFS has the same code as 3.5.