[OpenAFS-devel] Max /vicep partition size?

Sean O'Malley omalleys@msu.edu
Fri, 2 Feb 2007 13:46:48 -0500 (EST)


> .... is still not a problem, because we're talking about an error code, not
> the partition size.  com_err error codes are signed values, and while they
> are 32 bits wide, UV_PartitionInfo is a local API, not an RPC, so provided
> the prototype is present (which it is), you'll be fine even on the rare
> system on which 'int' is 64 bits (as someone else pointed out, int will not
> be smaller than 32 bits on any system on which AFS runs).
>

Are you sure that is an error code? I didnt do the math to see where
the bit flips are. From what I was understanding of the
code, it could be a int/uint issue.  If Largefile wasn't compiled in,
afs_sfsize_t is an afs_int32 and if it is then afs_sfsize_t is an
afs_int64. Which I believe if you look in that function, and chase down
it returns an int. But it was late last night when i tried to follow it
around. =) And of course I didnt write it down...

Certain compilers will take care of an int64, and turn it into an
unsigned int automagically. Sun's is supposed to which kind of makes me
wonder if largefile wasn't defined for that client during the build.

It also makes me wonder why afs_sfsize_t isn't actually in vol/partition.h
or at least afs_uint32 for:

struct DiskPartitionStats {
    afs_int32 free;
    afs_int32 totalUsable;
    afs_int32 minFree;
    afs_int32 f_files;
    #ifdef AFS_DEMAND_ATTACH_FS
    afs_int32 vol_list_len;
    #endif };

I might not be following this around quite right though. :)
*shrugs*