right now the math overflows the 32 bit type for >2tb partitions.
use larger variables to avoid this.
Reviewed-on: http://gerrit.openafs.org/392
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
ad1e9c7084e99a67ee7a61c255a6059ebc9190c3)
Change-Id: I75c4cd03dadce5218407a5e663474b2cd22a34ad
Reviewed-on: http://gerrit.openafs.org/961
*/
int PartSizeOverflow(char *path, int cs)
{
- int bsize = -1, totalblks, mint;
+ int bsize = -1;
+ afs_int64 totalblks, mint;
#if AFS_HAVE_STATVFS
struct statvfs statbuf;
bsize = statbuf.f_bsize;
#endif
if (bsize == -1)
- return 0; /* sucess */
+ return 0; /* success */
/* now free and totalblks are in fragment units, but we want them in 1K units */
if (bsize >= 1024) {