From owner-freebsd-current Mon Apr 23 15:19:40 2001 Delivered-To: freebsd-current@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 10A3637B422; Mon, 23 Apr 2001 15:19:36 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 23 Apr 2001 23:19:35 +0100 (BST) To: John Baldwin Cc: "David W. Chapman Jr." , freebsd-current@FreeBSD.org, Warner Losh , iedowse@maths.tcd.ie Subject: Re: kernel core In-Reply-To: Your message of "Mon, 23 Apr 2001 15:16:11 PDT." Date: Mon, 23 Apr 2001 23:19:35 +0100 From: Ian Dowse Message-ID: <200104232319.aa52574@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message