From owner-freebsd-current Fri Dec 4 04:13:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA24971 for freebsd-current-outgoing; Fri, 4 Dec 1998 04:13:45 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA24966 for ; Fri, 4 Dec 1998 04:13:42 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id XAA26965; Fri, 4 Dec 1998 23:13:22 +1100 Date: Fri, 4 Dec 1998 23:13:22 +1100 From: Bruce Evans Message-Id: <199812041213.XAA26965@godzilla.zeta.org.au> To: current@FreeBSD.ORG, julian@whistle.com Subject: Re: FreeBSD fsck updated Cc: Don.Lewis@tsc.tdk.com, mckusick@McKusick.COM Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >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