[OpenAFS-devel] Negative size on fs lq .

Satish Kumar ksatish@in.ibm.com
Thu, 17 Oct 2002 10:25:28 +0530


Hello -

If any one can make a patch with this ...

in src/vol/volume.h

#define nBlocks(bytes) ((bytes) == 0? 1: ((bytes)+1023)/1024)

nBlocks is adding 1023  bytes to the variable supplied to it to
calculate the size in K blocks. So when the size of a file in a
volume exceeds a value equal to (2GB - 1023 bytes), nBlocks makes
the size of the file greater than 2GB. But the data type of
variables like newlength, NewLength, size, length, in the file
'src/viced/afsfileprocs.c', which are used in the addition of size
of individual files is either int or afs_int32. Obviously, they
cannot hold numbers greater than 2GB

The fix includes changing the data types of variables: newlength,
NewLength, size, length, in the file 'src/viced/afsfileprocs.c'
from int to unsigned int and from afs_int32 to afs_uint32.


Thanks and Regards,
Satish.