Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

btrfs: fix compat mask in error messages in btrfs_check_features()

Commit d7f67ac9a928 ("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: d7f67ac9a928 ("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>

authored by

Mark Harmstone and committed by
David Sterba
587bb33b 1c7e9111

+3 -3
+3 -3
fs/btrfs/disk-io.c
··· 3187 3187 if (incompat & ~BTRFS_FEATURE_INCOMPAT_SUPP) { 3188 3188 btrfs_err(fs_info, 3189 3189 "cannot mount because of unknown incompat features (0x%llx)", 3190 - incompat); 3190 + incompat & ~BTRFS_FEATURE_INCOMPAT_SUPP); 3191 3191 return -EINVAL; 3192 3192 } 3193 3193 ··· 3219 3219 if (compat_ro_unsupp && is_rw_mount) { 3220 3220 btrfs_err(fs_info, 3221 3221 "cannot mount read-write because of unknown compat_ro features (0x%llx)", 3222 - compat_ro); 3222 + compat_ro_unsupp); 3223 3223 return -EINVAL; 3224 3224 } 3225 3225 ··· 3232 3232 !btrfs_test_opt(fs_info, NOLOGREPLAY)) { 3233 3233 btrfs_err(fs_info, 3234 3234 "cannot replay dirty log with unsupported compat_ro features (0x%llx), try rescue=nologreplay", 3235 - compat_ro); 3235 + compat_ro_unsupp); 3236 3236 return -EINVAL; 3237 3237 } 3238 3238