Date: Sat, 5 Dec 1998 13:36:17 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: bde@zeta.org.au (Bruce Evans) Cc: archie@whistle.com, bde@zeta.org.au, current@FreeBSD.ORG, Don.Lewis@tsc.tdk.com, julian@whistle.com, mckusick@McKusick.COM Subject: Re: FreeBSD fsck updated Message-ID: <199812052136.NAA00413@bubba.whistle.com> In-Reply-To: <199812050913.UAA30164@godzilla.zeta.org.au> from Bruce Evans at "Dec 5, 98 08:13:55 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812052136.NAA00413>