From owner-freebsd-current Sat Dec 5 13:37:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA13812 for freebsd-current-outgoing; Sat, 5 Dec 1998 13:37:37 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA13807 for ; Sat, 5 Dec 1998 13:37:36 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id NAA10667; Sat, 5 Dec 1998 13:36:46 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma010665; Sat, 5 Dec 98 13:36:17 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id NAA00413; Sat, 5 Dec 1998 13:36:17 -0800 (PST) From: Archie Cobbs Message-Id: <199812052136.NAA00413@bubba.whistle.com> Subject: Re: FreeBSD fsck updated In-Reply-To: <199812050913.UAA30164@godzilla.zeta.org.au> from Bruce Evans at "Dec 5, 98 08:13:55 pm" To: bde@zeta.org.au (Bruce Evans) Date: Sat, 5 Dec 1998 13:36:17 -0800 (PST) Cc: archie@whistle.com, bde@zeta.org.au, current@FreeBSD.ORG, Don.Lewis@tsc.tdk.com, julian@whistle.com, mckusick@McKusick.COM X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans writes: > >> 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. > > [...] > > 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 > *************** > *** 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 */ > Ah, good.. that fixes the underlying problem rather than the symptom. I still think fs_fmod should be cleared by fsck (perhaps silently). Otherwise, it's still possible to get the (unneccesary) panic if the bit on the disk somehow got flipped (possibly by running an older version of FreeBSD). -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message