]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ffs: restore backward compatibility of newfs and makefs with older binaries
authorChuck Silvers <chs@FreeBSD.org>
Tue, 30 May 2023 02:26:28 +0000 (19:26 -0700)
committerChuck Silvers <chs@FreeBSD.org>
Tue, 30 May 2023 02:26:28 +0000 (19:26 -0700)
commitd464a7698de8fe18530ea65fac90dce56b860a59
tree4827b614b665406b26c9332e4c3db55cfda6773a
parent8164032a495b53b9176814f7b08e093961fabdca
ffs: restore backward compatibility of newfs and makefs with older binaries

The previous change to CGSIZE had the unintended side-effect of allowing
newfs and makefs to create file systems that would fail validation when
examined by older commands and kernels, by allowing newfs/makefs to pack
slightly more blocks into a CG than those older binaries think is valid.
Fix this by having newfs/makefs artificially restrict the number of blocks
in a CG to the slightly smaller value that those older binaries will accept.
The validation code will continue to accept the slightly larger value
that the current newfs/makefs (before this change) could create.

Fixes: 0a6e34e950cd5889122a199c34519b67569be9cc
Reviewed by: mckusick
MFC after: 3 days
Sponsored by: Netflix
sbin/newfs/mkfs.c
usr.sbin/makefs/ffs/mkfs.c