Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: cem@kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: improve RT geometry validation
Date: Fri, 8 May 2026 17:54:42 -0700	[thread overview]
Message-ID: <20260509005442.GL7751@frogsfrogsfrogs> (raw)
In-Reply-To: <20260508081651.GA19827@lst.de>

On Fri, May 08, 2026 at 10:16:51AM +0200, Christoph Hellwig wrote:
> On Thu, May 07, 2026 at 10:17:58AM -0700, Darrick J. Wong wrote:
> > Isn't this already covered by xfs_validate_sb_rtgroups?
> 
> From a quick look it should...
> 
> > > -		div_u64_rem(sbp->sb_rextents, sbp->sb_rgextents, &mod);
> > > -		if (mod)
> > > +		if ((sbp->sb_features_incompat & XFS_SB_FEAT_INCOMPAT_ZONED) &&
> > > +		    mod > 0)
> > >  			return false;
> > 
> > And shouldn't this be in xfs_validate_sb_zoned?
> 
> This just slightly moves code.
> 
> > Or do you want this in xfs_validate_rt_geometry because that's what
> > xfs_repair calls to check the superblock?
> 
> I guess.  At least it was repair that went off on my badly messed up
> file system without this fix.
> 
> Maybe it's time to go back to the drawing board for the sb validation.

Yeah, it's unfortunate that xfs_repair duplicates most of that sb
validation code just so it can return an enum instead of xfs_err()ing
all over the place. :/

--D

      reply	other threads:[~2026-05-09  0:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <wV6uRtt8Mdv0dR-Ory4pMu4E-SDYDmUrTwaPRauY7S4lM07r4ogMmp38xxeF3FNG3X_E46ujDJHX94Lq_Oe-Vg==@protonmail.internalid>
2026-05-07  5:25 ` [PATCH] xfs: improve RT geometry validation Christoph Hellwig
2026-05-07 12:17   ` Carlos Maiolino
2026-05-07 17:17   ` Darrick J. Wong
2026-05-08  8:16     ` Christoph Hellwig
2026-05-09  0:54       ` 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=20260509005442.GL7751@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@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