Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 1998 23:13:22 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        current@FreeBSD.ORG, julian@whistle.com
Cc:        Don.Lewis@tsc.tdk.com, mckusick@McKusick.COM
Subject:   Re: FreeBSD fsck updated
Message-ID:  <199812041213.XAA26965@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Is this the verboseness you were complaining about?
>
>
>diff -cr fsck/pass5.c fsck.julian/pass5.c
>*** fsck/pass5.c	Wed Dec  2 18:41:11 1998
>--- fsck.julian/pass5.c	Wed Dec  2 16:26:18 1998
>***************
>*** 355,361 ****
>  	    && dofix(&idesc[0], "FREE BLK COUNT(S) WRONG IN SUPERBLK")) {
>  		memmove(&fs->fs_cstotal, &cstotal, sizeof *cs);
>  		fs->fs_ronly = 0;
  		^^^^^^^^^^^^^^^^^
>- 		fs->fs_fmod = 0;
  		^^^^^^^^^^^^^^^^
>  		sbdirty();
>  	}
>  }
>--- 355,378 ----
>  	    && dofix(&idesc[0], "FREE BLK COUNT(S) WRONG IN SUPERBLK")) {
>  		memmove(&fs->fs_cstotal, &cstotal, sizeof *cs);
>  		fs->fs_ronly = 0;
>  		sbdirty();
>+ 	}
>+ 	if (fs->fs_fmod != 0) {
>+ 		pwarn("MODIFIED FLAG SET IN SUPERBLOCK");
>+ 		if (preen)
>+ 			printf(" (FIXED)\n");
>+ 		if (preen || reply("FIX") == 1) {
>+ 			fs->fs_fmod = 0;
>+ 			sbdirty();
>+ 		}
>+ 	}
>+ 	if (fs->fs_clean == 0) {
>+ 		pwarn("CLEAN FLAG NOT SET IN SUPERBLOCK");
>+ 		if (preen)
>+ 			printf(" (FIXED)\n");
>+ 		if (preen || reply("FIX") == 1) {
>+ 			fs->fs_clean = 1;
>+ 			sbdirty();
>+ 		}
>  	}
>  }

I like the warning for fs_clean == 0 in the preen case.  The code for
setting fs_clean in the !preen case seems to have rotted - there is
other code that sets the fs_clean flag and it usually sets it even if
you answer 'n' here.

Clearing fs_fmod here seems to be bogus.  It is set (to 0 or 1)
unconditionally at mount time.  Similarly for fs_ronly.  I don't see
how it can be right to clear these flags here _only_ when a certain
type of inconsistency (that has nothing to do with these flags)
is fixed.

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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