From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Carlos Maiolino <cem@kernel.org>,
linux-xfs@vger.kernel.org, hch@lst.de,
xfs-stable <xfs-stable@lists.linux.dev>,
stable@vger.kernel.org, david.flynn@oracle.com
Subject: Re: [PATCH] xfs: fix online repair probing when CONFIG_XFS_ONLINE_REPAIR=n
Date: Wed, 15 Jan 2025 07:06:15 +0100 [thread overview]
Message-ID: <20250115060615.GA29387@lst.de> (raw)
In-Reply-To: <20250114224819.GD2103004@frogsfrogsfrogs>
On Tue, Jan 14, 2025 at 02:48:19PM -0800, Darrick J. Wong wrote:
> index 950f5a58dcd967..09468f50781b24 100644
> --- a/fs/xfs/scrub/scrub.c
> +++ b/fs/xfs/scrub/scrub.c
> @@ -149,6 +149,15 @@ xchk_probe(
> if (xchk_should_terminate(sc, &error))
> return error;
>
> + /*
> + * If the caller is probing to see if repair works, set the CORRUPT
> + * flag (without any of the usual tracing/logging) to force us into
> + * the repair codepaths. If repair is compiled into the kernel, we'll
> + * call xrep_probe and simulate a repair; otherwise, the repair
> + * codepaths return EOPNOTSUPP.
> + */
> + if (xchk_could_repair(sc))
> + sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
Stupid question: what is the point in not just directly returning
-EOPNOTSUPP here when online repair is not supported?
next prev parent reply other threads:[~2025-01-15 6:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 22:48 [PATCH] xfs: fix online repair probing when CONFIG_XFS_ONLINE_REPAIR=n Darrick J. Wong
2025-01-15 6:06 ` Christoph Hellwig [this message]
2025-01-15 6:20 ` Darrick J. Wong
2025-01-15 6:27 ` Christoph Hellwig
2025-01-15 6:29 ` Darrick J. Wong
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=20250115060615.GA29387@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=david.flynn@oracle.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xfs-stable@lists.linux.dev \
/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