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 4/8] xfs_scrub: fix spacemap external log device scan dev key
Date: Fri, 26 Jun 2026 10:09:14 -0700 [thread overview]
Message-ID: <20260626170914.GZ6078@frogsfrogsfrogs> (raw)
In-Reply-To: <20260626050345.GD8786@lst.de>
On Fri, Jun 26, 2026 at 07:03:45AM +0200, Christoph Hellwig wrote:
> On Thu, Jun 25, 2026 at 03:55:15PM -0700, Darrick J. Wong wrote:
> > --- a/scrub/spacemap.c
> > +++ b/scrub/spacemap.c
> > @@ -213,7 +213,7 @@ scan_rt_rmaps(
> > scan_dev_rmaps(ctx, ctx->fsinfo.fs_rtdev, arg);
> > }
> >
> > -/* Iterate all the reverse mappings of the log device. */
> > +/* Iterate all the reverse mappings of the external log device. */
> > static void
> > scan_log_rmaps(
> > struct workqueue *wq,
> > @@ -222,7 +222,12 @@ scan_log_rmaps(
> > {
> > struct scrub_ctx *ctx = (struct scrub_ctx *)wq->wq_ctx;
> >
> > - scan_dev_rmaps(ctx, ctx->mnt.fsgeom.rtstart ? 2 : ctx->fsinfo.fs_logdev,
> > + /*
> > + * Internal rt sections (rtstart != 0) means we use synthetic device
> > + * keys for external devices.
> > + */
> > + scan_dev_rmaps(ctx, ctx->mnt.fsgeom.rtstart ? XFS_DEV_LOG :
> > + ctx->fsinfo.fs_logdev,
>
> Maybe this should be using to_fsmap_dev instead? Move the call
> to to_fsmap_dev into scan_dev_rmaps for further simplification.
Yeah. phase7 could use from_fsmap_dev, so I'll hoist both to spacemap.h
and clean up the callsites.
> scan_rt_rmaps seems to have similar issues.
I don't agree with that since it's only used for pre-rtgroups rt volumes
which can't be internal, but it's trivial to clean it up along with the
other callsites so in it goes.
--D
next prev parent reply other threads:[~2026-06-26 17:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 22:54 [PATCHSET] xfs_scrub: codex-inspired bug fixes, part 3 Darrick J. Wong
2026-06-25 22:54 ` [PATCH 1/8] xfs_scrub: stop user file scan if caller already aborte Darrick J. Wong
2026-06-26 4:58 ` Christoph Hellwig
2026-06-26 16:46 ` Darrick J. Wong
2026-06-25 22:54 ` [PATCH 2/8] xfs_scrub: don't flatten error numbers in read_verify_schedule_now Darrick J. Wong
2026-06-26 4:58 ` Christoph Hellwig
2026-06-25 22:54 ` [PATCH 3/8] xfs_scrub: actually handle NEEDSCHECK scrub items in phase 4 Darrick J. Wong
2026-06-26 4:59 ` Christoph Hellwig
2026-06-25 22:55 ` [PATCH 4/8] xfs_scrub: fix spacemap external log device scan dev key Darrick J. Wong
2026-06-26 5:03 ` Christoph Hellwig
2026-06-26 17:09 ` Darrick J. Wong [this message]
2026-06-25 22:55 ` [PATCH 5/8] xfs_scrub: fix estimate of work items for phase 4 Darrick J. Wong
2026-06-26 5:04 ` Christoph Hellwig
2026-06-26 16:55 ` Darrick J. Wong
2026-06-25 22:55 ` [PATCH 6/8] xfs_scrub: don't leak phase 5 scan items after a failed workqueue_add Darrick J. Wong
2026-06-26 5:04 ` Christoph Hellwig
2026-06-25 22:56 ` [PATCH 7/8] xfs_scrub: fix phase 8 debug reporting Darrick J. Wong
2026-06-26 5:05 ` Christoph Hellwig
2026-06-25 22:56 ` [PATCH 8/8] xfs_scrub: always finish cleanup, even if reporting healthy state fails Darrick J. Wong
2026-06-26 5:05 ` 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=20260626170914.GZ6078@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