OpenAFS CVS Commit: openafs/src/vol by shadow
cvs@penn.central.org
cvs@penn.central.org
Wed, 04 Apr 2001 13:28:07 EDT
Update of /usr1/cvs/openafs/src/vol
In directory penn.central.org:/usr0/build/openafs/openafs/src/vol
Modified Files:
namei_ops.c
Log Message:
DELTA make-getfreetag-find-correct-free-tags-20010404
AUTHOR reuter@rzg.mpg.de
"I have found a "nice" bug in namei_ops.c:
In GetFreeTag() the following code was used to find a free place in the
link table entry:
/* Now find a free column in this row and claim it. */
coldata = 0x7;
for (col = 0; col<NAMEI_MAXVOLS; col++) {
coldata <<= col * 3;
if ((row & coldata) == 0)
break;
}
What happens?
With col == 0 we look for the bits 0x7. This is ok.
With col == 1 we look for the bits 0x38. This is also ok.
With col == 2 we look for the bits 0xe00 instead of 0x1c0 !!!
But later the allocation is done correctly with 0x40.
Thus the next time he will find again a free place for col == 2 !
For higher values of col the test is also incorrect, of course."
--- DELTA config follows ---
make-getfreetag-find-correct-free-tags-20010404 openafs/src/vol/namei_ops.c 1.4 1.5