HomeFreeBSD

makefs: Ensure that FFS superblocks are reproducible

Description

makefs: Ensure that FFS superblocks are reproducible

The superblock structure has space reserved for a pointer to an
in-memory structure that gets created at mount time. makefs populates
it since that simplifies code elsewhere. However, the pointer value
ends up in the output file, which breaks reproducibility.

Zero the field when writing the superblock instead, as its on-disk value
is ignored.

Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50196

(cherry picked from commit 764ccf410c3c5453c4656113d75cd81fcf01828d)

Details

Provenance
markjAuthored on May 8 2025, 3:49 PM
Reviewer
emaste
Differential Revision
D50196: makefs: Ensure that FFS superblocks are reproducible
Parents
rG001fc46caa54: file: Simplify an INVARIANTS check in _fdrop()
Branches
Unknown
Tags
Unknown