HomeFreeBSD

Fix dnode byteswapping

Description

Fix dnode byteswapping

If a dnode has a spill pointer, and we use DN_SLOTS_TO_BONUSLEN() then
we will possibly include the spill pointer in the len calculation and it
will be byteswapped. Then dnode_byteswap() will carry on and swap the
spill pointer again. Fix this by using DN_MAX_BONUS_LEN() instead.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #13002
Closes #13015

Details

Provenance
g_amanakis_yahoo.comAuthored on Jun 30 2022, 12:06 AM
GitHub <noreply@github.com>Committed on Jun 30 2022, 12:06 AM
Parents
rG2d434e8ae413: contrib: dracut: zfs-{rollback,snapshot}-bootfs: explicit snapname fix
Branches
Unknown
Tags
Unknown