mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 08:22:44 +00:00
Restrict fs_maxfilesize to 2^40; this is part of a bug fix from Kirk
McKusick to work around problems in FFS related to the blkno of a 64bit offset not fitting into an int. Submitted by: Marshall Kirk McKusick
This commit is contained in:
parent
5663e6de1c
commit
a3189e21e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3767
@ -284,6 +284,8 @@ mkfs(pp, fsys, fi, fo)
|
||||
sizepb *= NINDIR(&sblock);
|
||||
sblock.fs_maxfilesize += sizepb;
|
||||
}
|
||||
/* XXX - hack to prevent overflow of a 32bit block number */
|
||||
sblock.fs_maxfilesize = MIN(sblock.fs_maxfilesize, (u_quad_t) 1 << 39);
|
||||
/*
|
||||
* Validate specified/determined secpercyl
|
||||
* and calculate minimum cylinders per group.
|
||||
|
Loading…
Reference in New Issue
Block a user