From owner-freebsd-current Mon Apr 23 17:46: 4 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id C7EC637B42C; Mon, 23 Apr 2001 17:46:00 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id KAA20942; Tue, 24 Apr 2001 10:45:49 +1000 Date: Tue, 24 Apr 2001 10:43:26 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Ian Dowse Cc: John Baldwin , "David W. Chapman Jr." , freebsd-current@FreeBSD.ORG, Warner Losh Subject: Re: kernel core In-Reply-To: <200104232319.aa52574@salmon.maths.tcd.ie> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 23 Apr 2001, Ian Dowse wrote: > In message , John Baldwin writes: > > > > > >Fair enough, I guess ffs_reload() should just sanity check the values. Any > >takers? > > You could try this (untested). I have to run now, but I can test it > later as it's easy enough to reproduce. > > Ian > > Index: ffs_vfsops.c > =================================================================== > RCS file: /dump/FreeBSD-CVS/src/sys/ufs/ffs/ffs_vfsops.c,v > retrieving revision 1.146 > diff -u -r1.146 ffs_vfsops.c > --- ffs_vfsops.c 2001/04/17 05:37:51 1.146 > +++ ffs_vfsops.c 2001/04/23 22:15:55 > @@ -427,6 +427,11 @@ > brelse(bp); > mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen; > ffs_oldfscompat(fs); > + /* An old fsck may have clobbered these fields, so recheck them. */ > + if (fs->fs_avgfilesize <= 0) /* XXX */ > + fs->fs_avgfilesize = AVFILESIZ; /* XXX */ > + if (fs->fs_avgfpdir <= 0) /* XXX */ > + fs->fs_avgfpdir = AFPDIR; /* XXX */ > > /* > * Step 3: re-read summary information from disk. I think this and the corresponding code in ffs_mountfs() should be in ffs_oldfscompat(), or at least in a common routine. We need to do some fixups for old filesystems, and the present problem shows that a filesystem may become "old" again after the initial mount makes it "new". Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message