Author: mckusick
Date: Mon Jan  6 21:23:14 2020
New Revision: 356428
URL: https://svnweb.freebsd.org/changeset/base/356428

Log:
  MFC of 356063
  
  Do not ask to use journal in fsck_ffs if journal is out of date

Modified:
  stable/11/sbin/fsck_ffs/main.c
  stable/11/sbin/fsck_ffs/suj.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/fsck_ffs/main.c
==============================================================================
--- stable/11/sbin/fsck_ffs/main.c      Mon Jan  6 21:14:27 2020        
(r356427)
+++ stable/11/sbin/fsck_ffs/main.c      Mon Jan  6 21:23:14 2020        
(r356428)
@@ -420,13 +420,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: stable/11/sbin/fsck_ffs/suj.c
==============================================================================
--- stable/11/sbin/fsck_ffs/suj.c       Mon Jan  6 21:14:27 2020        
(r356427)
+++ stable/11/sbin/fsck_ffs/suj.c       Mon Jan  6 21:23:14 2020        
(r356428)
@@ -2726,6 +2726,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().
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to