Re: [PATCH v3] xfs: check da node block pad field during scrub
From: Yuto Ohnuki
Date: Mon Apr 20 2026 - 14:13:54 EST
On Wed, Apr 15, 2026 at 08:20:35AM -0700, Darrick J. Wong wrote:
> On Fri, Apr 10, 2026 at 06:06:15PM +0100, Yuto Ohnuki wrote:
> > The da node block header (xfs_da3_node_hdr) contains a __pad32 field
> > that should always be zero. Add a check for this during directory and
> > attribute btree scrubbing.
> >
> > Since old kernels may have written non-zero padding without issues, flag
> > this as an optimization opportunity (preen) rather than corruption.
> >
> > Signed-off-by: Yuto Ohnuki <ytohnuki@xxxxxxxxxx>
>
> Should the dabtree write verifier also set __pad32 to zero, in case the
> kernel encounters a dabtree block writen out before the memset was added
> to xfs_da3_node_create in commit a45086e27dfa21 ("xfs: validate metadata
> LSNs against log on v5 superblocks")?
>
> This change on its own is correct though, so
> Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx>
>
> --D
Thank you for the suggestion and review. I'll investigate and send a
follow-up patch to zero __pad32 in xfs_da3_node_write_verify().
Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284
Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705