svn commit: r356063 - head/sbin/fsck_ffs

Kirk McKusick mckusick at FreeBSD.org
Tue Dec 24 23:03:13 UTC 2019


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().


More information about the svn-src-head mailing list