HomeFreeBSD

stand: Teach the zfs loader about dynamic gang headers

Description

stand: Teach the zfs loader about dynamic gang headers

There is a pool feature, dynamic_gang_header, that is enabled by default
in new pools. When this feature is active, gang headers may be larger
than 512 bytes. The loader needs to be taught to cope with that.

Try using the vdev ashift to pick the gang block header size. If the
checksum fails, fall back to the old gang block header size.

This is based on a patch by Paul Dagnelie, with testing, bug-fixing and
some simplifications from me.

PR: 289690
Co-authored by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53578

(cherry picked from commit 4d6801a6b5bdd4d055a00484a743cb4ada659669)

Details

Provenance
markjAuthored on Nov 6 2025, 4:00 PM
Reviewer
imp
Differential Revision
D53578: stand: Handle dynamic gang headers
Parents
rGca36afaf671b: MFV: less v685.
Branches
Unknown
Tags
Unknown