mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
xfs: check da node block pad field during scrub
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> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
af47a4be6a
commit
fca20fcb76
|
|
@ -454,7 +454,12 @@ xchk_da_btree_block(
|
|||
}
|
||||
}
|
||||
|
||||
/* XXX: Check hdr3.pad32 once we know how to fix it. */
|
||||
if (xfs_has_crc(ip->i_mount)) {
|
||||
struct xfs_da3_node_hdr *nodehdr3 = blk->bp->b_addr;
|
||||
|
||||
if (nodehdr3->__pad32)
|
||||
xchk_da_set_preen(ds, level);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
xchk_da_set_corrupt(ds, level);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user