public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Carlos Maiolino <cem@kernel.org>,
	linux-xfs@vger.kernel.org,
	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: Tue, 14 Jan 2025 22:29:55 -0800	[thread overview]
Message-ID: <20250115062955.GC3566461@frogsfrogsfrogs> (raw)
In-Reply-To: <20250115062743.GA29997@lst.de>

On Wed, Jan 15, 2025 at 07:27:43AM +0100, Christoph Hellwig wrote:
> On Tue, Jan 14, 2025 at 10:20:37PM -0800, Darrick J. Wong wrote:
> > Good point, we could cut it off right then and there.  Though this seems
> > a little gross:
> > 
> > 	if (xchk_could_repair(sc))
> > #ifdef CONFIG_XFS_ONLINE_REPAIR
> > 		sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
> > #else
> > 		return -EOPNOTSUPP;
> > #endif
> > 	return 0;
> > 
> > but I don't mind.  Some day the stubs will go away, fingers crossed.
> 
> We'll I'd write it as:
> 
> 	if (xchk_could_repair(sc)) {
> 		if (!IS_ENABLED(CONFIG_XFS_ONLINE_REPAIR))
> 			return -EOPNOTSUPP;
> 		sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
> 	}
> 
> but I'm fine with either version:

I like your version /much/ better.

> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

--D

      reply	other threads:[~2025-01-15  6:29 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
2025-01-15  6:20   ` Darrick J. Wong
2025-01-15  6:27     ` Christoph Hellwig
2025-01-15  6:29       ` Darrick J. Wong [this message]

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=20250115062955.GC3566461@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=david.flynn@oracle.com \
    --cc=hch@lst.de \
    --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