]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: add "0x" prefix for unsupported optional features
authorQu Wenruo <wqu@suse.com>
Tue, 10 May 2022 07:10:18 +0000 (15:10 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 17 May 2022 18:15:25 +0000 (20:15 +0200)
The following error message lack the "0x" obviously:

  cannot mount because of unsupported optional features (4000)

Add the prefix to make it less confusing. This can happen on older
kernels that try to mount a filesystem with newer features so it makes
sense to backport to older trees.

CC: stable@vger.kernel.org # 4.14+
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c

index 26446d6215c71d93d7bc793e2044f22fb50035de..f33093513360dc988b1d190827b479f50d45c150 100644 (file)
@@ -3612,7 +3612,7 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
                ~BTRFS_FEATURE_INCOMPAT_SUPP;
        if (features) {
                btrfs_err(fs_info,
-                   "cannot mount because of unsupported optional features (%llx)",
+                   "cannot mount because of unsupported optional features (0x%llx)",
                    features);
                err = -EINVAL;
                goto fail_alloc;
@@ -3650,7 +3650,7 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
                ~BTRFS_FEATURE_COMPAT_RO_SUPP;
        if (!sb_rdonly(sb) && features) {
                btrfs_err(fs_info,
-       "cannot mount read-write because of unsupported optional features (%llx)",
+       "cannot mount read-write because of unsupported optional features (0x%llx)",
                       features);
                err = -EINVAL;
                goto fail_alloc;