From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: don't consider future format versions valid
Date: Wed, 12 Apr 2023 05:13:41 -0700 [thread overview]
Message-ID: <ZDagdV4uGpRyogxj@infradead.org> (raw)
In-Reply-To: <20230411232342.233433-3-david@fromorbit.com>
> @@ -86,16 +87,16 @@ xfs_sb_good_version(
> if (xfs_sb_is_v5(sbp))
> return xfs_sb_validate_v5_features(sbp);
>
> + /* versions prior to v4 are not supported */
> + if (XFS_SB_VERSION_NUM(sbp) != XFS_SB_VERSION_4)
> + return false;
The comment is a bit confusing now. But maybe the v4 checks should
move into a xfs_sb_validate_v4_features helper anyway, which
would lead to a quite nice flow here:
if (xfs_sb_is_v5(sbp))
return xfs_sb_validate_v5_features(sbp);
if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4)
return xfs_sb_validate_v4_features(sbp);
return false;
next prev parent reply other threads:[~2023-04-12 12:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 23:23 [PATCH 0/2] xfs: a couple of syzbot fixes Dave Chinner
2023-04-11 23:23 ` [PATCH 1/2] xfs: remove WARN when dquot cache insertion fails Dave Chinner
2023-04-11 23:32 ` Darrick J. Wong
2023-04-12 12:10 ` Christoph Hellwig
2023-04-11 23:23 ` [PATCH 2/2] xfs: don't consider future format versions valid Dave Chinner
2023-04-11 23:32 ` Darrick J. Wong
2023-04-12 12:13 ` Christoph Hellwig [this message]
2023-04-12 21:37 ` Dave Chinner
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=ZDagdV4uGpRyogxj@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--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