Date: Mon, 16 Oct 2017 21:53:29 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r324674 - stable/11/sbin/fsck_ffs Message-ID: <201710162153.v9GLrTbc041016@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Mon Oct 16 21:53:29 2017 New Revision: 324674 URL: https://svnweb.freebsd.org/changeset/base/324674 Log: MFC of 324456. Do not report filesystem as modified if only timestamp updated in superblock. Modified: stable/11/sbin/fsck_ffs/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/fsck_ffs/main.c ============================================================================== --- stable/11/sbin/fsck_ffs/main.c Mon Oct 16 21:46:11 2017 (r324673) +++ stable/11/sbin/fsck_ffs/main.c Mon Oct 16 21:53:29 2017 (r324674) @@ -231,6 +231,7 @@ checkfilesys(char *filesys) struct group *grp; struct iovec *iov; char errmsg[255]; + int ofsmodified; int iovlen; int cylno; intmax_t blks, files; @@ -425,10 +426,15 @@ checkfilesys(char *filesys) } /* * Write the superblock so we don't try to recover the - * journal on another pass. + * journal on another pass. If this is the only change + * to the filesystem, we do not want it to be called + * out as modified. */ sblock.fs_mtime = time(NULL); sbdirty(); + ofsmodified = fsmodified; + flush(fswritefd, &sblk); + fsmodified = ofsmodified; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710162153.v9GLrTbc041016>