Skip to content

Commit 587bb33

Browse files
maharmstonekdave
authored andcommitted
btrfs: fix compat mask in error messages in btrfs_check_features()
Commit d7f67ac ("btrfs: relax block-group-tree feature dependency checks") 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. Fixes: d7f67ac ("btrfs: relax block-group-tree feature dependency checks") Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Mark Harmstone <mark@harmstone.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 1c7e911 commit 587bb33

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

fs/btrfs/disk-io.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3187,7 +3187,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount)
31873187
if (incompat & ~BTRFS_FEATURE_INCOMPAT_SUPP) {
31883188
btrfs_err(fs_info,
31893189
"cannot mount because of unknown incompat features (0x%llx)",
3190-
incompat);
3190+
incompat & ~BTRFS_FEATURE_INCOMPAT_SUPP);
31913191
return -EINVAL;
31923192
}
31933193

@@ -3219,7 +3219,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount)
32193219
if (compat_ro_unsupp && is_rw_mount) {
32203220
btrfs_err(fs_info,
32213221
"cannot mount read-write because of unknown compat_ro features (0x%llx)",
3222-
compat_ro);
3222+
compat_ro_unsupp);
32233223
return -EINVAL;
32243224
}
32253225

@@ -3232,7 +3232,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount)
32323232
!btrfs_test_opt(fs_info, NOLOGREPLAY)) {
32333233
btrfs_err(fs_info,
32343234
"cannot replay dirty log with unsupported compat_ro features (0x%llx), try rescue=nologreplay",
3235-
compat_ro);
3235+
compat_ro_unsupp);
32363236
return -EINVAL;
32373237
}
32383238

0 commit comments

Comments
 (0)