]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: check directory data block header padding in scrub
authorYuto Ohnuki <ytohnuki@amazon.com>
Sat, 11 Apr 2026 14:24:15 +0000 (15:24 +0100)
committerCarlos Maiolino <cem@kernel.org>
Mon, 27 Apr 2026 08:36:36 +0000 (10:36 +0200)
commit939919ccddfcc379bb82b1f90f732d9a5cb32cc8
tree47b38dde3dc6c420962370f48af9d39ef89a4b8c
parent8fbb1877dfa5e26bda1baf8cc6abd3f805098486
xfs: check directory data block header padding in scrub

Add the missing scrub check for the pad field in directory data block
headers. Old kernels may have written non-zero padding without issue,
and the write path now self-heals stale padding on modification. Flag
non-zero padding as an optimization opportunity (preen) rather than
corruption.

Add xchk_fblock_set_preen helper for reporting file fork block issues
that could be optimized. The trace event xchk_fblock_preen already
exists.

Signed-off-by: Yuto Ohnuki <ytohnuki@amazon.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/dir.c