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>
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) {