* [PATCH] btrfs: fix error messages in btrfs_check_features()
@ 2026-02-18 11:13 Mark Harmstone
2026-02-18 20:37 ` Qu Wenruo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mark Harmstone @ 2026-02-18 11:13 UTC (permalink / raw)
To: linux-btrfs, wqu; +Cc: 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")
---
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;
}
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] btrfs: fix error messages in btrfs_check_features()
2026-02-18 11:13 [PATCH] btrfs: fix error messages in btrfs_check_features() Mark Harmstone
@ 2026-02-18 20:37 ` Qu Wenruo
2026-02-23 18:55 ` David Sterba
2026-02-23 18:59 ` David Sterba
2 siblings, 0 replies; 4+ messages in thread
From: Qu Wenruo @ 2026-02-18 20:37 UTC (permalink / raw)
To: Mark Harmstone, linux-btrfs
在 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;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] btrfs: fix error messages in btrfs_check_features()
2026-02-18 11:13 [PATCH] btrfs: fix error messages in btrfs_check_features() Mark Harmstone
2026-02-18 20:37 ` Qu Wenruo
@ 2026-02-23 18:55 ` David Sterba
2026-02-23 18:59 ` David Sterba
2 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2026-02-23 18:55 UTC (permalink / raw)
To: Mark Harmstone; +Cc: linux-btrfs, wqu
On Wed, Feb 18, 2026 at 11:13:40AM +0000, Mark Harmstone wrote:
> Commit d7f67ac9
Please use full commit reference in changelog text at least for the
first occurence, the format is the same as for the Fixes: line. Thanks.
> 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")
> ---
> 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;
> }
>
> --
> 2.52.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] btrfs: fix error messages in btrfs_check_features()
2026-02-18 11:13 [PATCH] btrfs: fix error messages in btrfs_check_features() Mark Harmstone
2026-02-18 20:37 ` Qu Wenruo
2026-02-23 18:55 ` David Sterba
@ 2026-02-23 18:59 ` David Sterba
2 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2026-02-23 18:59 UTC (permalink / raw)
To: Mark Harmstone; +Cc: linux-btrfs, wqu
On Wed, Feb 18, 2026 at 11:13:40AM +0000, Mark Harmstone wrote:
> Commit d7f67ac9
Also please configure your git so the hashes are at least 12 characters,
I've been using 14 and I think others do too. This is 'core.abbrev'
config.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-23 18:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18 11:13 [PATCH] btrfs: fix error messages in btrfs_check_features() Mark Harmstone
2026-02-18 20:37 ` Qu Wenruo
2026-02-23 18:55 ` David Sterba
2026-02-23 18:59 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox