public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: Mark Harmstone <mark@harmstone.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix error messages in btrfs_check_features()
Date: Thu, 19 Feb 2026 07:07:52 +1030	[thread overview]
Message-ID: <be341f62-b4e2-4e25-9406-007b49a45c66@suse.com> (raw)
In-Reply-To: <20260218111346.31243-1-mark@harmstone.com>



在 2026/2/18 21:43, Mark Harmstone 写道:
> Commit d7f67ac9 introduced a regression when it comes to handling
> unsupported incompat or compat_ro flags. Beforehand we only printed the
> flags that we didn't recognize, afterwards we printed them all, which is
> less useful. Fix the error handling so it behaves like it used to.
> 
> Signed-off-by: Mark Harmstone <mark@harmstone.com>
> Fixes: d7f67ac9a928 ("btrfs: relax block-group-tree feature dependency checks")

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>   fs/btrfs/disk-io.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index f39008591631..7478d1c50cca 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -3176,7 +3176,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount)
>   	if (incompat & ~BTRFS_FEATURE_INCOMPAT_SUPP) {
>   		btrfs_err(fs_info,
>   		"cannot mount because of unknown incompat features (0x%llx)",
> -		    incompat);
> +		    incompat & ~BTRFS_FEATURE_INCOMPAT_SUPP);
>   		return -EINVAL;
>   	}
>   
> @@ -3208,7 +3208,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount)
>   	if (compat_ro_unsupp && is_rw_mount) {
>   		btrfs_err(fs_info,
>   	"cannot mount read-write because of unknown compat_ro features (0x%llx)",
> -		       compat_ro);
> +		       compat_ro_unsupp);
>   		return -EINVAL;
>   	}
>   
> @@ -3221,7 +3221,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount)
>   	    !btrfs_test_opt(fs_info, NOLOGREPLAY)) {
>   		btrfs_err(fs_info,
>   "cannot replay dirty log with unsupported compat_ro features (0x%llx), try rescue=nologreplay",
> -			  compat_ro);
> +			  compat_ro_unsupp);
>   		return -EINVAL;
>   	}
>   


  reply	other threads:[~2026-02-18 20:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 11:13 [PATCH] btrfs: fix error messages in btrfs_check_features() Mark Harmstone
2026-02-18 20:37 ` Qu Wenruo [this message]
2026-02-23 18:55 ` David Sterba
2026-02-23 18:59 ` David Sterba

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=be341f62-b4e2-4e25-9406-007b49a45c66@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mark@harmstone.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox