All of lore.kernel.org
 help / color / mirror / Atom feed
From: Long Li <leo.lilong@huawei.com>
To: <djwong@kernel.org>, <cem@kernel.org>
Cc: <linux-xfs@vger.kernel.org>, <david@fromorbit.com>,
	<yi.zhang@huawei.com>, <houtao1@huawei.com>,
	<yangerkun@huawei.com>
Subject: Re: [PATCH] xfs: remove unknown compat feature check in superblock write validation
Date: Sat, 9 Nov 2024 15:38:55 +0800	[thread overview]
Message-ID: <Zy8Rj7eISiraFIha@localhost.localdomain> (raw)
In-Reply-To: <20241021012549.875726-1-leo.lilong@huawei.com>


Friendly Ping ...

On Mon, Oct 21, 2024 at 09:25:49AM +0800, Long Li wrote:
> Compat features are new features that older kernels can safely ignore,
> allowing read-write mounts without issues. The current sb write validation
> implementation returns -EFSCORRUPTED for unknown compat features,
> preventing filesystem write operations and contradicting the feature's
> definition.
> 
> Additionally, if the mounted image is unclean, the log recovery may need
> to write to the superblock. Returning an error for unknown compat features
> during sb write validation can cause mount failures.
> 
> Although XFS currently does not use compat feature flags, this issue
> affects current kernels' ability to mount images that may use compat
> feature flags in the future.
> 
> Since superblock read validation already warns about unknown compat
> features, it's unnecessary to repeat this warning during write validation.
> Therefore, the relevant code in write validation is being removed.
> 
> Fixes: 9e037cb7972f ("xfs: check for unknown v5 feature bits in superblock write verifier")
> Signed-off-by: Long Li <leo.lilong@huawei.com>
> ---
>  fs/xfs/libxfs/xfs_sb.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
> index d95409f3cba6..02ebcbc4882f 100644
> --- a/fs/xfs/libxfs/xfs_sb.c
> +++ b/fs/xfs/libxfs/xfs_sb.c
> @@ -297,13 +297,6 @@ xfs_validate_sb_write(
>  	 * the kernel cannot support since we checked for unsupported bits in
>  	 * the read verifier, which means that memory is corrupt.
>  	 */
> -	if (xfs_sb_has_compat_feature(sbp, XFS_SB_FEAT_COMPAT_UNKNOWN)) {
> -		xfs_warn(mp,
> -"Corruption detected in superblock compatible features (0x%x)!",
> -			(sbp->sb_features_compat & XFS_SB_FEAT_COMPAT_UNKNOWN));
> -		return -EFSCORRUPTED;
> -	}
> -
>  	if (!xfs_is_readonly(mp) &&
>  	    xfs_sb_has_ro_compat_feature(sbp, XFS_SB_FEAT_RO_COMPAT_UNKNOWN)) {
>  		xfs_alert(mp,
> -- 
> 2.39.2
> 

  reply	other threads:[~2024-11-09  7:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21  1:25 [PATCH] xfs: remove unknown compat feature check in superblock write validation Long Li
2024-11-09  7:38 ` Long Li [this message]
2024-11-09 16:21   ` Darrick J. Wong
2024-11-11  2:14     ` Long Li

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=Zy8Rj7eISiraFIha@localhost.localdomain \
    --to=leo.lilong@huawei.com \
    --cc=cem@kernel.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=houtao1@huawei.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.