fs: btrfs: Do not print mount fail message when not btrfs filesystem
authorMarek Behún <marek.behun@nic.cz>
Fri, 26 Apr 2019 13:11:09 +0000 (15:11 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 May 2019 11:23:17 +0000 (07:23 -0400)
Other filesystem drivers don't do this.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
fs/btrfs/super.c

index 7aaf8f9b0d860569921bc746ff5021a400590f43..2dc4a6fcd7a3da9b331aa0b4d84329d7594df281 100644 (file)
@@ -198,17 +198,16 @@ int btrfs_read_superblock(void)
                        break;
 
                if (btrfs_check_super_csum(raw_sb)) {
-                       printf("%s: invalid checksum at superblock mirror %i\n",
-                              __func__, i);
+                       debug("%s: invalid checksum at superblock mirror %i\n",
+                             __func__, i);
                        continue;
                }
 
                btrfs_super_block_to_cpu(sb);
 
                if (sb->magic != BTRFS_MAGIC) {
-                       printf("%s: invalid BTRFS magic 0x%016llX at "
-                              "superblock mirror %i\n", __func__, sb->magic,
-                              i);
+                       debug("%s: invalid BTRFS magic 0x%016llX at "
+                             "superblock mirror %i\n", __func__, sb->magic, i);
                } else if (sb->bytenr != superblock_offsets[i]) {
                        printf("%s: invalid bytenr 0x%016llX (expected "
                               "0x%016llX) at superblock mirror %i\n",
@@ -224,7 +223,7 @@ int btrfs_read_superblock(void)
        }
 
        if (!btrfs_info.sb.generation) {
-               printf("%s: No valid BTRFS superblock found!\n", __func__);
+               debug("%s: No valid BTRFS superblock found!\n", __func__);
                return -1;
        }