Inode check-hash errors were being reported after system crashes.
Trace the cause down to journalled soft updates recovery code in fsck failing to recompute the check-hash after updating an inode. As inode check-hash was first introduced to UFS in FreeBSD 13, there is no need to MFC this commit. Reported by: Chuck Silvers Sponsored by: Netflix
This commit is contained in:
parent
2a18059670
commit
0c08ecdff3
@ -1622,6 +1622,7 @@ ino_trunc(ino_t ino, off_t size)
|
||||
}
|
||||
DIP_SET(ip, di_blocks, fsbtodb(fs, totalfrags));
|
||||
DIP_SET(ip, di_size, size);
|
||||
ino_dirty(ino);
|
||||
/*
|
||||
* If we've truncated into the middle of a block or frag we have
|
||||
* to zero it here. Otherwise the file could extend into
|
||||
@ -1959,6 +1960,7 @@ ino_unlinked(void)
|
||||
mode = DIP(ip, di_mode) & IFMT;
|
||||
inon = DIP(ip, di_freelink);
|
||||
DIP_SET(ip, di_freelink, 0);
|
||||
ino_dirty(ino);
|
||||
/*
|
||||
* XXX Should this be an errx?
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user