@@ -418,8 +418,10 @@ static int btrfs_check_super_csum(struct btrfs_fs_info 
*fs_info,
                              crc, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE);
        btrfs_csum_final(crc, result);
- if (memcmp(raw_disk_sb, result, sizeof(result)))
-               return 1;
+       if (memcmp(raw_disk_sb, result, sizeof(result))) {
+               btrfs_err(fs_info, "superblock checksum mismatch");
+               return -EINVAL;

Don't we want EUCLEAN here, since an error in the checksum indicates
corruption?

 With the v2 patch sentout here is the error str that is seen on the cli.

  mount: mount /dev/sdb on /btrfs failed: Structure needs cleaning

I am ok. However would have much better if it says checksum error.

Do you/anyone suggest I should update the errno.h?

Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to