Darrick J. Wong bc1f8a86e3 xfs: fix zero byte checking in the superblock scrubber
commit c004a793e0ec34047c3bd423bcd8966f5fac88dc upstream.

The logic to check that the region past the end of the superblock is all
zeroes is wrong -- we don't want to check only the bytes past the end of
the maximally sized ondisk superblock structure as currently defined in
xfs_format.h; we want to check the bytes beyond the end of the ondisk as
defined by the feature bits.

Port the superblock size logic from xfs_repair and then put it to use in
xfs_scrub.

Cc: <stable@vger.kernel.org> # v4.15
Fixes: 21fb4cb1981ef7 ("xfs: scrub the secondary superblocks")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-27 14:02:01 +01:00
..
2024-09-01 08:58:20 -07:00
2024-04-23 07:47:00 -07:00
2024-04-23 07:47:00 -07:00
2024-04-22 18:00:47 +05:30
2024-08-12 22:01:05 -04:00
2024-04-23 07:47:00 -07:00
2024-11-01 07:45:00 -10:00
2024-09-20 17:53:17 -07:00
2024-04-23 07:46:50 -07:00