svn commit: r359790 - head/sbin/fsck_ffs
Kirk McKusick
mckusick at FreeBSD.org
Fri Apr 10 23:58:08 UTC 2020
Author: mckusick
Date: Fri Apr 10 23:58:07 2020
New Revision: 359790
URL: https://svnweb.freebsd.org/changeset/base/359790
Log:
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
Modified:
head/sbin/fsck_ffs/suj.c
Modified: head/sbin/fsck_ffs/suj.c
==============================================================================
--- head/sbin/fsck_ffs/suj.c Fri Apr 10 23:49:34 2020 (r359789)
+++ head/sbin/fsck_ffs/suj.c Fri Apr 10 23:58:07 2020 (r359790)
@@ -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?
*/
More information about the svn-src-all
mailing list