@@ -2570,9 +2568,14 @@ int open_ctree(struct super_block *sb, * We want to check superblock checksum, the type is stored inside. * Pass the whole disk block of size BTRFS_SUPER_INFO_SIZE (4k). */ - if (btrfs_check_super_csum(fs_info, bh->b_data)) { - btrfs_err(fs_info, "superblock checksum mismatch"); - err = -EINVAL; + err = btrfs_check_super_csum(bh->b_data); + if (err) { + if (err == -EINVAL) + pr_err("BTRFS error (device %pg): unsupported checksum algorithm", + fs_devices->latest_bdev); + else + pr_err("BTRFS error (device %pg): superblock checksum mismatch", + fs_devices->latest_bdev);nit: I think your initial version of specifically checking for EUCLEAN was better but I don't have strong preferences.
Fixed this in v4. Also updated the changelog. Thanks for the review. Anand -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
