xfs: actually check internal-rtdev fields in the superblock

LOLLM points out that the superblock scrubber doesn't check the new
fields that were added for internal realtime volumes when we added zoned
device support.

Cc: stable@vger.kernel.org # v6.15
Fixes: 2167eaabe2 ("xfs: define the zoned on-disk format")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
Darrick J. Wong 2026-09-08 23:04:50 -07:00 committed by Carlos Maiolino
parent 4d3c075915
commit 1ee2ce797c

View File

@ -418,6 +418,13 @@ xchk_superblock(
xchk_block_set_corrupt(sc, bp);
}
if (xfs_has_zoned(mp)) {
if (sb->sb_rtstart != cpu_to_be64(mp->m_sb.sb_rtstart))
xchk_block_set_corrupt(sc, bp);
if (sb->sb_rtreserved != cpu_to_be64(mp->m_sb.sb_rtreserved))
xchk_block_set_corrupt(sc, bp);
}
/* Everything else must be zero. */
sblen = xchk_superblock_ondisk_size(mp);
if (memchr_inv((char *)sb + sblen, 0, BBTOB(bp->b_length) - sblen))