HomeFreeBSD

Additional validity checking in newfs(8).

Description

Additional validity checking in newfs(8).

A check in the superblock validity code verifies that the computed
size of the filesystem cylinder groups (CGSIZE macro) does not
exceed the filesystem block size (fs_bsize).

A report was received that a filesystem had been flagged as failing
this check. We were unable to determine how the reported filesystem
could have been created. This commit adds a check at the end of the
newfs(8) command to verify that the the cylinder group size is valid.
If an oversize cylinder group is found newfs(8) prints a diagnostic
output and rebuilds the filesystem to make it compiliant.

MFC after: 1 week

Details

Provenance
mckusickAuthored on Apr 29 2023, 7:49 PM
Parents
rGa2d1957bbcc8: Updates to UFS/FFS superblock integrity checks when reading a superblock.
Branches
Unknown
Tags
Unknown