Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Yuto Ohnuki <ytohnuki@amazon.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Carlos Maiolino <cem@kernel.org>, Dave Chinner <dgc@kernel.org>,
	<linux-xfs@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] xfs: check da node block pad field during scrub
Date: Mon, 20 Apr 2026 18:42:12 +0100	[thread overview]
Message-ID: <aeZldBLyOx7HXX3u@c889f3b07a0a.ant.amazon.com> (raw)
In-Reply-To: <20260415152035.GC114209@frogsfrogsfrogs>

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@amazon.com>
> 
> 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@kernel.org>
> 
> --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




  reply	other threads:[~2026-04-20 17:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 17:06 [PATCH v3] xfs: check da node block pad field during scrub Yuto Ohnuki
2026-04-15 15:20 ` Darrick J. Wong
2026-04-20 17:42   ` Yuto Ohnuki [this message]
2026-04-27 13:26 ` Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aeZldBLyOx7HXX3u@c889f3b07a0a.ant.amazon.com \
    --to=ytohnuki@amazon.com \
    --cc=cem@kernel.org \
    --cc=dgc@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox