HomeFreeBSD

ffs: restore backward compatibility of newfs and makefs with older binaries

Description

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

(cherry picked from commit d464a7698de8fe18530ea65fac90dce56b860a59)

Details

Provenance
chsAuthored on May 30 2023, 2:26 AM
Parents
rGb4dd6e1a2837: ports(7): '*-list' targets: Add/fix doc on whether they are recursive
Branches
Unknown
Tags
Unknown