HomeFreeBSD

BRT: Fix ZAP entry endianness

Description

BRT: Fix ZAP entry endianness

During original block cloning implementation a mistake was made,
making BRT ZAP entries an array of 8 1-byte entries instead of 1
entry of 8 bytes. This makes the pools non-endian-safe.

This commit introduces a new read-compatible pool feature
"com.truenas:block_cloning_endian", fixing the endianness issue
for new pools while maintaining compatibility with existing ones.

The feature is automatically activated when creating the first BRT
ZAP (ensuring we don't activate it on pools that already have BRT
entries in the old format). When active, BRT entries are stored
as single 8-byte values.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #17572

Details

Provenance
mavAuthored on Jul 30 2025, 4:42 PM
GitHub <noreply@github.com>Committed on Jul 30 2025, 4:42 PM
Parents
rG10a78e264793: Faster checksum benchmark on system boot
Branches
Unknown
Tags
Unknown