OpenAFS CVS Commit: openafs/src/vol by shadow

cvs@penn.central.org cvs@penn.central.org
Mon, 23 Apr 2001 03:01:12 EDT


Update of /usr1/cvs/openafs/src/vol
In directory penn.central.org:/usr0/build/openafs/openafs-stable/src/vol

Modified Files:
      Tag: openafs-stable-1_0_x
	namei_ops.c 
Log Message:
DELTA make-getfreetag-find-correct-free-tags-20010423
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 for openafs-stable-1_0_x follows ---
make-getfreetag-find-correct-free-tags-20010423 openafs/src/vol/namei_ops.c 1.2.2.1 1.2.2.2