Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2020 23:58:07 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r359790 - head/sbin/fsck_ffs
Message-ID:  <202004102358.03ANw7AB084431@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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?
 		 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004102358.03ANw7AB084431>