Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/ext2fs/ext2_csum.c
Show First 20 Lines • Show All 623 Lines • ▼ Show 20 Lines | if (provided != calculated) { | ||||
/* | /* | ||||
* If it is first time used dinode, | * If it is first time used dinode, | ||||
* it is expected that it will be zeroed | * it is expected that it will be zeroed | ||||
* and we will not return checksum error in this case. | * and we will not return checksum error in this case. | ||||
*/ | */ | ||||
if (!memcmp(ei, &ei_zero, sizeof(struct ext2fs_dinode))) | if (!memcmp(ei, &ei_zero, sizeof(struct ext2fs_dinode))) | ||||
return (0); | return (0); | ||||
printf("WARNING: Bad inode %ju csum - run fsck\n", ip->i_number); | |||||
return (EIO); | return (EIO); | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
void | void | ||||
ext2_ei_csum_set(struct inode *ip, struct ext2fs_dinode *ei) | ext2_ei_csum_set(struct inode *ip, struct ext2fs_dinode *ei) | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |