viced: AFSDisk, AFSFetchVolumeStatus Int31 PartSize

The AFSDisk and AFSFetchVolumeStatus structures use signed
32-bit integers for representation partition size and
available blocks.  RoundInt64ToInt31() should be used instead
of RoundInt64ToInt32() when assigning their values.

(cherry picked from commit e8f6dfac59)
Reviewed-on: http://gerrit.openafs.org/7022
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

Change-Id: I81f2f120c0080b1d680fa362372e54dd3af1f3f6
Reviewed-on: http://gerrit.openafs.org/7025
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2012-04-02 22:35:41 -04:00 committed by Jeffrey Altman
parent 6115fd7498
commit 4ec351a673

View File

@ -1958,8 +1958,8 @@ RXGetVolumeStatus(AFSFetchVolumeStatus * status, char **name, char **offMsg,
status->MinQuota = V_minquota(volptr);
status->MaxQuota = V_maxquota(volptr);
status->BlocksInUse = V_diskused(volptr);
status->PartBlocksAvail = volptr->partition->free;
status->PartMaxBlocks = volptr->partition->totalUsable;
status->PartBlocksAvail = RoundInt64ToInt31(volptr->partition->free);
status->PartMaxBlocks = RoundInt64ToInt31(volptr->partition->totalUsable);
/* now allocate and copy these things; they're freed by the RXGEN stub */
temp = strlen(V_name(volptr)) + 1;