Date: Tue, 19 Feb 2019 20:12:12 +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: r344302 - head/sbin/fsck_ffs Message-ID: <201902192012.x1JKCC6m071557@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Tue Feb 19 20:12:12 2019 New Revision: 344302 URL: https://svnweb.freebsd.org/changeset/base/344302 Log: Ensure that inode updates are properly flushed out during the first pass of fsck_ffs. Some changes, such as check-hash corrections were being lost. Reported by: Michael Tuexen (tuexen@) Tested by: Michael Tuexen (tuexen@) MFC after: 3 days Modified: head/sbin/fsck_ffs/inode.c Modified: head/sbin/fsck_ffs/inode.c ============================================================================== --- head/sbin/fsck_ffs/inode.c Tue Feb 19 19:57:55 2019 (r344301) +++ head/sbin/fsck_ffs/inode.c Tue Feb 19 20:12:12 2019 (r344302) @@ -349,9 +349,11 @@ getnextinode(ino_t inumber, int rebuildcg) lastinum += fullcnt; } /* + * Flush old contents in case they have been updated. * If getblk encounters an error, it will already have zeroed * out the buffer, so we do not need to do so here. */ + flush(fswritefd, &inobuf); getblk(&inobuf, blk, size); nextinop = inobuf.b_un.b_buf; } @@ -461,6 +463,10 @@ void freeinodebuf(void) { + /* + * Flush old contents in case they have been updated. + */ + flush(fswritefd, &inobuf); if (inobuf.b_un.b_buf != NULL) free((char *)inobuf.b_un.b_buf); inobuf.b_un.b_buf = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902192012.x1JKCC6m071557>