Fixed overflow in the calculation of the number of inodes per group
for filesystems with almost the maximum number of sectors. The maxiumum is 2^31, but overflow is common for that size, and overflow normally occurred here at size (2^31 - 4096).
This commit is contained in:
parent
5832a75246
commit
5a3e77d851
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36498
@ -1059,7 +1059,7 @@ calcipg(cpg, bpcg, usedbp)
|
|||||||
* Prepare to scale by fssize / (number of sectors in cylinder groups).
|
* Prepare to scale by fssize / (number of sectors in cylinder groups).
|
||||||
* Note that fssize is still in sectors, not filesystem blocks.
|
* Note that fssize is still in sectors, not filesystem blocks.
|
||||||
*/
|
*/
|
||||||
ncyl = howmany(fssize, secpercyl);
|
ncyl = howmany(fssize, (u_int)secpercyl);
|
||||||
ncg = howmany(ncyl, cpg);
|
ncg = howmany(ncyl, cpg);
|
||||||
/*
|
/*
|
||||||
* Iterate a few times to allow for ipg depending on itself.
|
* Iterate a few times to allow for ipg depending on itself.
|
||||||
|
Loading…
Reference in New Issue
Block a user