From owner-freebsd-current Sat Dec 5 01:14:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA22188 for freebsd-current-outgoing; Sat, 5 Dec 1998 01:14:23 -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 BAA22175 for ; Sat, 5 Dec 1998 01:14:20 -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 UAA30164; Sat, 5 Dec 1998 20:13:55 +1100 Date: Sat, 5 Dec 1998 20:13:55 +1100 From: Bruce Evans Message-Id: <199812050913.UAA30164@godzilla.zeta.org.au> To: archie@whistle.com, bde@zeta.org.au Subject: Re: FreeBSD fsck updated Cc: current@FreeBSD.ORG, Don.Lewis@tsc.tdk.com, julian@whistle.com, mckusick@McKusick.COM Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Bruce Evans writes: >> >+ 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(); >> >+ } >> >+ } >> >> ... >> >> Clearing fs_fmod here seems to be bogus. It is set (to 0 or 1) >> ... >We (Julian & me) are the ones who added this bit of code to clear >the modified flag after seeing a panic caused by mounting a filesystem >read-only that had this bit set (even though it was "clean", as >the previous fsck didn't clear this bit). I forget exactly how it >can happen, but it can (and did). It can't happen now. This was fixed without comment in the big soft updates commit. Bruce RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_vfsops.c,v Working file: ffs_vfsops.c head: 1.92 ... ---------------------------- revision 1.76 date: 1998/03/08 09:59:06; author: julian; state: Exp; lines: +63 -22 Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman) Submitted by: Kirk McKusick (mcKusick@mckusick.com) Obtained from: WHistle development tree ---------------------------- Index: ffs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_vfsops.c,v retrieving revision 1.75 retrieving revision 1.76 diff -c -r1.75 -r1.76 *** ffs_vfsops.c 1998/03/07 21:36:36 1.75 --- ffs_vfsops.c 1998/03/08 09:59:06 1.76 *************** *** 31,37 **** * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 ! * $Id: ffs_vfsops.c,v 1.75 1998/03/07 21:36:36 dyson Exp $ */ #include "opt_quota.h" --- 31,37 ---- * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 ! * $Id: ffs_vfsops.c,v 1.76 1998/03/08 09:59:06 julian Exp $ */ #include "opt_quota.h" ... *************** *** 1200,1205 **** --- 1239,1246 ---- if (allerror) return (allerror); bp = getblk(mp->um_devvp, SBLOCK, (int)fs->fs_sbsize, 0, 0); + fs->fs_fmod = 0; + fs->fs_time = time.tv_sec; bcopy((caddr_t)fs, bp->b_data, (u_int)fs->fs_sbsize); /* Restore compatibility to old file systems. XXX */ dfs = (struct fs *)bp->b_data; /* XXX */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message