]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_scrub: handle media scans of internal rt devices correctly
authorDarrick J. Wong <djwong@kernel.org>
Wed, 24 Jun 2026 18:15:17 +0000 (11:15 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Thu, 25 Jun 2026 13:42:53 +0000 (15:42 +0200)
commit3e4bb144f657b17bae9fba224acc10afd8f32e50
treeac801ac6e1add4d5c36c13b5b18ae94f9c220cc2
parent2712427c08a5ee7d24500ca93997fbabbdb43e8b
xfs_scrub: handle media scans of internal rt devices correctly

Codex noticed media scans of internal rt devices don't work at all
correctly.  First, we fail to allocate a ctx->verify_disks[XFS_DEV_RT]
for the internal rt section, and even if we did, phase 6 doesn't
allocate media_verify_state.rvp[XFS_DEV_RT] if there's a media error on
an internal rt volume, so we'll crash there too.

Fix both issues to make it work properly.

Cc: linux-xfs@vger.kernel.org # v6.15.0
Fixes: 37591ef3f4f14c ("xfs_scrub: support internal RT device")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/phase1.c
scrub/phase6.c
scrub/spacemap.c