btrfs-progs: Use more loose open ctree flags for dump-tree and restore
[platform/upstream/btrfs-progs.git] / cmds-inspect-dump-super.c
index 150c2e5..e965267 100644 (file)
@@ -339,7 +339,10 @@ static void dump_superblock(struct btrfs_super_block *sb, int full)
        printf("csum\t\t\t0x");
        for (i = 0, p = sb->csum; i < csum_size; i++)
                printf("%02x", p[i]);
-       if (check_csum_sblock(sb, csum_size))
+       if (csum_type != BTRFS_CSUM_TYPE_CRC32 ||
+           csum_size != btrfs_csum_sizes[BTRFS_CSUM_TYPE_CRC32])
+               printf(" [UNKNOWN CSUM TYPE OR SIZE]");
+       else if (check_csum_sblock(sb, csum_size))
                printf(" [match]");
        else
                printf(" [DON'T MATCH]");