Date: Sat, 5 Dec 1998 20:13:55 +1100 From: Bruce Evans <bde@zeta.org.au> To: archie@whistle.com, bde@zeta.org.au Cc: current@FreeBSD.ORG, Don.Lewis@tsc.tdk.com, julian@whistle.com, mckusick@McKusick.COM Subject: Re: FreeBSD fsck updated Message-ID: <199812050913.UAA30164@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812050913.UAA30164>