Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: aalbersh@kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 03/11] xfs_scrub: handle media scans of internal rt devices correctly
Date: Thu, 25 Jun 2026 15:48:54 -0700	[thread overview]
Message-ID: <20260625224854.GM6078@frogsfrogsfrogs> (raw)
In-Reply-To: <20260625120119.GD18766@lst.de>

On Thu, Jun 25, 2026 at 02:01:19PM +0200, Christoph Hellwig wrote:
> On Wed, Jun 24, 2026 at 11:15:17AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > 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.
> 
> Do you have a test case for this?

Sort of -- xfs/556 is the media verification test, but it _notruns on
zoned filesystems because of _require_xfs_scratch_non_zoned.  The
_notrun logic isn't quite right because while dm-error doesn't work for
zoned disks, it works fine with -rzoned=1 on conventional storage.

Well, not entirely -- with zoned=1 and conventional external rt storage
it works fine, but with an internal rt volume, it does:

--- /run/fstests/bin/tests/xfs/556.out  2025-07-15 14:41:40.342952932 -0700
+++ /run/fstests/logs/xfs/556.out.bad   2026-06-25 15:35:59.593600834 -0700
@@ -1,12 +1,7 @@
 QA output created by 556
+blockdev: cannot open : No such file or directory
 Scrub for injected media error (single threaded)
-Unfixable Error: SCRATCH_MNT/a: media error at data offset 2FSB length 1FSB.
-SCRATCH_MNT: unfixable errors found: 1
 Scrub for injected media error (multi threaded)
-Unfixable Error: SCRATCH_MNT/a: media error at data offset 2FSB length 1FSB.
-SCRATCH_MNT: unfixable errors found: 1
-od: SCRATCH_MNT/a: Input/output error
 Scrub for injected media error (after remount)
-Unfixable Error: SCRATCH_MNT/a: media error at data offset 2FSB length 1FSB.
-SCRATCH_MNT: unfixable errors found: 1
+blockdev: cannot open : No such file or directory
 Scrub after removing injected media error

So I have to patch fstests further to avoid setting errordev=RT when
there's no external volume.

--D

> The changes look good, but I'd love to have coverage for it...
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> 

  reply	other threads:[~2026-06-25 22:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24 18:14 [PATCHSET] xfs_scrub: codex-inspired bug fixes, part 2 Darrick J. Wong
2026-06-24 18:14 ` [PATCH 01/11] xfs_scrub: handle missing media verify ioctl failure return codes Darrick J. Wong
2026-06-25 12:00   ` Christoph Hellwig
2026-06-24 18:15 ` [PATCH 02/11] xfs_scrub: report bad file ranges correctly Darrick J. Wong
2026-06-25 12:00   ` Christoph Hellwig
2026-06-24 18:15 ` [PATCH 03/11] xfs_scrub: handle media scans of internal rt devices correctly Darrick J. Wong
2026-06-25 12:01   ` Christoph Hellwig
2026-06-25 22:48     ` Darrick J. Wong [this message]
2026-06-26  4:50       ` Christoph Hellwig
2026-06-24 18:15 ` [PATCH 04/11] xfs_scrub: track inode scan abort state with an enum Darrick J. Wong
2026-06-25 12:02   ` Christoph Hellwig
2026-06-25 22:31     ` Darrick J. Wong
2026-06-24 18:15 ` [PATCH 05/11] xfs_scrub: don't skip bulkstat batch when scrub_scan_user_files helper returns ESTALE Darrick J. Wong
2026-06-25 12:03   ` Christoph Hellwig
2026-06-24 18:16 ` [PATCH 06/11] xfs_scrub: warn about incomplete repairs if we never get to them Darrick J. Wong
2026-06-25 12:03   ` Christoph Hellwig
2026-06-24 18:16 ` [PATCH 07/11] xfs_scrub: report external log space usage in phase 7 Darrick J. Wong
2026-06-25 12:05   ` Christoph Hellwig
2026-06-24 18:16 ` [PATCH 08/11] xfs_scrub: account only data extent tail after an overlap Darrick J. Wong
2026-06-25 12:05   ` Christoph Hellwig
2026-06-24 18:16 ` [PATCH 09/11] xfs_scrub: account for reflinked realtime file data Darrick J. Wong
2026-06-25 12:06   ` Christoph Hellwig
2026-06-24 18:17 ` [PATCH 10/11] xfs_scrub: don't leak the autofsck fsproperty handle Darrick J. Wong
2026-06-25 12:06   ` Christoph Hellwig
2026-06-24 18:17 ` [PATCH 11/11] xfs_scrub: warn about difficult rtgroup repairs Darrick J. Wong
2026-06-25 12:06   ` Christoph Hellwig

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=20260625224854.GM6078@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@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