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.

Approved by: re (cperciva)
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)
(cherry picked from commit ae17780c717547a7b52cc593dca8867c0e14f9ef)

Details

Provenance
markjAuthored on Nov 6 2025, 4:00 PM
cpercivaCommitted on Nov 13 2025, 8:12 PM
Reviewer
imp
Differential Revision
D53578: stand: Handle dynamic gang headers
Parents
rGbee506b8833d: Azure: Fix image names
Branches
Unknown
Tags
Unknown