From: "Darrick J. Wong" <djwong@kernel.org>
To: hch@lst.de, cem@kernel.org, djwong@kernel.org
Cc: stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH 1/6] xfs: cross-reference the rtgroup superblock extent, not block
Date: Wed, 02 Sep 2026 22:51:05 -0700 [thread overview]
Message-ID: <178840969850.484660.6737366204336091136.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <178840969793.484660.11718284266382755759.stgit@frogsfrogsfrogs>
From: Darrick J. Wong <djwong@kernel.org>
LOLLM noticed that when libxfs creates a realtime superblock, it will
create an rtrmapbt record covering the entire rtextent in which the
superblock lives. However, the cross-referencing checks only look for
the first block, which means that we can miss a corrupt rtrmap record.
That will get picked up by the rtrmap scrubber, but we should make the
rgsuper scrubber more robust anyway.
Cc: <stable@vger.kernel.org> # v6.13
Fixes: 3f1bdf50ab1b9c ("xfs: scrub the realtime group superblock")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
---
fs/xfs/scrub/rgsuper.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/scrub/rgsuper.c b/fs/xfs/scrub/rgsuper.c
index 2bd2c0351b35f7..6e2abe5dc27cd5 100644
--- a/fs/xfs/scrub/rgsuper.c
+++ b/fs/xfs/scrub/rgsuper.c
@@ -36,8 +36,10 @@ xchk_rgsuperblock_xref(
if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
return;
- xchk_xref_is_used_rt_space(sc, xfs_rgbno_to_rtb(sc->sr.rtg, 0), 1);
- xchk_xref_is_only_rt_owned_by(sc, 0, 1, &XFS_RMAP_OINFO_FS);
+ xchk_xref_is_used_rt_space(sc, xfs_rgbno_to_rtb(sc->sr.rtg, 0),
+ sc->mp->m_sb.sb_rextsize);
+ xchk_xref_is_only_rt_owned_by(sc, 0, sc->mp->m_sb.sb_rextsize,
+ &XFS_RMAP_OINFO_FS);
}
int
next prev parent reply other threads:[~2026-09-03 5:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 5:51 [PATCHSET] xfs: LLM-inspired bug fixes, part 10 Darrick J. Wong
2026-09-03 5:51 ` Darrick J. Wong [this message]
2026-09-03 6:04 ` [PATCH 1/6] xfs: cross-reference the rtgroup superblock extent, not block Christoph Hellwig
2026-09-03 5:51 ` [PATCH 2/6] xfs: use the rtgroup extent count to find rtrefcount gaps Darrick J. Wong
2026-09-03 6:07 ` Christoph Hellwig
2026-09-03 5:51 ` [PATCH 3/6] xfs: strengthen the "is cow staging" helpers in scrub Darrick J. Wong
2026-09-03 6:08 ` Christoph Hellwig
2026-09-03 5:51 ` [PATCH 4/6] xfs: fix rtrefcount btree block counting " Darrick J. Wong
2026-09-03 6:10 ` Christoph Hellwig
2026-09-03 5:52 ` [PATCH 5/6] xfs: make the rtsummary repair fix the file size too Darrick J. Wong
2026-09-03 6:11 ` Christoph Hellwig
2026-09-03 5:52 ` [PATCH 6/6] xfs: count escaped corruption errors in scrub stats Darrick J. Wong
2026-09-03 6:11 ` Christoph Hellwig
2026-09-07 6:29 ` [PATCHSET] xfs: LLM-inspired bug fixes, part 10 Carlos Maiolino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178840969850.484660.6737366204336091136.stgit@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox