Date: Mon, 9 Oct 2017 22:19:58 +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: r324456 - head/sbin/fsck_ffs Message-ID: <201710092219.v99MJwf0011723@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Mon Oct 9 22:19:58 2017 New Revision: 324456 URL: https://svnweb.freebsd.org/changeset/base/324456 Log: Do not report the filesystem as modified when the only change is to update the timestamp in the superblock. Reported by: Peter Holm MFC after: 1 week Modified: head/sbin/fsck_ffs/main.c Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Mon Oct 9 22:17:18 2017 (r324455) +++ head/sbin/fsck_ffs/main.c Mon Oct 9 22:19:58 2017 (r324456) @@ -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?201710092219.v99MJwf0011723>