btrfs: add "0x" prefix for unsupported optional features
authorQu Wenruo <wqu@suse.com>
Tue, 10 May 2022 07:10:18 +0000 (15:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 14:53:43 +0000 (16:53 +0200)
commit d5321a0fa8bc49f11bea0b470800962c17d92d8f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/disk-io.c

index 41ebc613ca4cf63500daa923f4db4f5b05d5ceea..589722f3593489928f31496b16dd4a2c6005f8ef 100644 (file)
@@ -2653,7 +2653,7 @@ int open_ctree(struct super_block *sb,
                ~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;
@@ -2713,7 +2713,7 @@ int open_ctree(struct super_block *sb,
                ~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;