From: Rod Widdowson Date: Wed, 26 May 2010 15:18:26 +0000 (+0100) Subject: Make file offsets in vldb layout unsigned ints X-Git-Tag: openafs-devel-1_5_75~57 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=16f19e79d1a6a13a3e07ae9be3aab50f28c06045 Make file offsets in vldb layout unsigned ints vlserver.h has a few cases where links through the vldb are being stored as afs_int32s. These are file offsets and should be unsigned. This commit fixes just these declarations. The code still compiles (because they are silently cast all over the shop), but it starts the tidy effort. Change-Id: Iba14bd28cb43a6ca6401be4252bb45135d8b3a55 Reviewed-on: http://gerrit.openafs.org/2027 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/vlserver/vlserver.p.h b/src/vlserver/vlserver.p.h index d2b0367..af33857 100644 --- a/src/vlserver/vlserver.p.h +++ b/src/vlserver/vlserver.p.h @@ -38,7 +38,7 @@ extern struct vldstats dynamic_statistics; struct vlheader { struct vital_vlheader vital_header; /* all small critical stuff are in here */ afs_uint32 IpMappedAddr[MAXSERVERID + 1]; /* Mapping of ip addresses to relative ones */ - afs_int32 VolnameHash[HASHSIZE]; /* hash table for vol names */ + afs_uint32 VolnameHash[HASHSIZE]; /* hash table for vol names */ afs_uint32 VolidHash[MAXTYPES][HASHSIZE]; /* hash table for vol ids */ afs_int32 SIT; /* spare for poss future use */ }; @@ -65,8 +65,8 @@ struct vlentry { afs_int32 LockTimestamp; /* lock time stamp */ afs_uint32 cloneId; /* used during cloning */ afs_int32 spares0; /* XXXX was AssociatedChain XXXX */ - afs_int32 nextIdHash[MAXTYPES]; /* Next id hash table pointer (or freelist ->[0]) */ - afs_int32 nextNameHash; /* Next name hash table pointer */ + afs_uint32 nextIdHash[MAXTYPES]; /* Next id hash table pointer (or freelist ->[0]) */ + afs_uint32 nextNameHash; /* Next name hash table pointer */ afs_int32 spares1[2]; /* long spares */ char name[VL_MAXNAMELEN]; /* Volume name */ char spares3; /* XXX was volumeType XXXX */ @@ -83,8 +83,8 @@ struct nvlentry { afs_int32 LockAfsId; /* Person who locked entry */ afs_int32 LockTimestamp; /* lock time stamp */ afs_uint32 cloneId; /* used during cloning */ - afs_int32 nextIdHash[MAXTYPES]; /* Next id hash table pointer (or freelist ->[0]) */ - afs_int32 nextNameHash; /* Next name hash table pointer */ + afs_uint32 nextIdHash[MAXTYPES]; /* Next id hash table pointer (or freelist ->[0]) */ + afs_uint32 nextNameHash; /* Next name hash table pointer */ char name[VL_MAXNAMELEN]; /* Volume name */ u_char serverNumber[NMAXNSERVERS]; /* Server # for each server that holds volume */ u_char serverPartition[NMAXNSERVERS]; /* Server Partition number */