Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 2019 23:03:13 +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: r356063 - head/sbin/fsck_ffs
Message-ID:  <201912242303.xBON3DA3073665@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Tue Dec 24 23:03:12 2019
New Revision: 356063
URL: https://svnweb.freebsd.org/changeset/base/356063

Log:
  When running fsck_ffs manually, do not ask:
  
  	USE JOURNAL? [yn]
  
  when the journal timestamp does not match the filesystem mount time
  as we are just going to print an error and fall through to a full fsck.
  Instead, just run a full fsck.
  
  Requested by: Bjoern A. Zeeb (bz)
  MFC after:    7 days

Modified:
  head/sbin/fsck_ffs/main.c
  head/sbin/fsck_ffs/suj.c

Modified: head/sbin/fsck_ffs/main.c
==============================================================================
--- head/sbin/fsck_ffs/main.c	Tue Dec 24 22:27:06 2019	(r356062)
+++ head/sbin/fsck_ffs/main.c	Tue Dec 24 23:03:12 2019	(r356063)
@@ -423,13 +423,11 @@ checkfilesys(char *filesys)
 	 */
 	if ((sblock.fs_flags & FS_SUJ) == FS_SUJ) {
 		if ((sblock.fs_flags & FS_NEEDSFSCK) != FS_NEEDSFSCK && skipclean) {
-			if (preen || reply("USE JOURNAL")) {
-				if (suj_check(filesys) == 0) {
-					printf("\n***** FILE SYSTEM MARKED CLEAN *****\n");
-					if (chkdoreload(mntp) == 0)
-						exit(0);
-					exit(4);
-				}
+			if (suj_check(filesys) == 0) {
+				printf("\n***** FILE SYSTEM MARKED CLEAN *****\n");
+				if (chkdoreload(mntp) == 0)
+					exit(0);
+				exit(4);
 			}
 			printf("** Skipping journal, falling through to full fsck\n\n");
 		}

Modified: head/sbin/fsck_ffs/suj.c
==============================================================================
--- head/sbin/fsck_ffs/suj.c	Tue Dec 24 22:27:06 2019	(r356062)
+++ head/sbin/fsck_ffs/suj.c	Tue Dec 24 23:03:12 2019	(r356063)
@@ -2720,6 +2720,8 @@ suj_check(const char *filesys)
 	printf("** SU+J Recovering %s\n", filesys);
 	if (suj_verifyino(jip) != 0)
 		return (-1);
+	if (!preen && !reply("USE JOURNAL"))
+		return (-1);
 	/*
 	 * Build a list of journal blocks in jblocks before parsing the
 	 * available journal blocks in with suj_read().



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