From owner-svn-src-all@freebsd.org Fri Apr 10 23:58:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09B6A27EC73; Fri, 10 Apr 2020 23:58:08 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48zZhb6R3rz3KXL; Fri, 10 Apr 2020 23:58:07 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D81996BA1; Fri, 10 Apr 2020 23:58:07 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ANw7n8084432; Fri, 10 Apr 2020 23:58:07 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ANw7AB084431; Fri, 10 Apr 2020 23:58:07 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202004102358.03ANw7AB084431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 10 Apr 2020 23:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359790 - head/sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sbin/fsck_ffs X-SVN-Commit-Revision: 359790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 23:58:08 -0000 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? */