Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2001 01:18:57 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Warner Losh <imp@harmony.village.org>
Cc:        John Baldwin <jhb@FreeBSD.org>, freebsd-current@FreeBSD.org, iedowse@maths.tcd.ie
Subject:   Re: kernel core 
Message-ID:   <200104240118.aa62225@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Mon, 23 Apr 2001 23:19:35 BST." <200104232319.aa52574@salmon.maths.tcd.ie> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200104232319.aa52574@salmon.maths.tcd.ie>, Ian Dowse writes:
>You could try this (untested). I have to run now, but I can test it
>later as it's easy enough to reproduce.

Almost, but I missed the fs_contigdirs field, which was the real
culprit. An updated patch is below; this seems to stop the panics
for me. I'll just run this by Kirk first, and commit it if he has
no objections.

There probably does need to be something in UPDATING saying that
after the dirpref changes have been used, running a pre-dirpref
version of fsck may generate some serious-looking warnings that
are actually harmless. I think some people were seeing:

	VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE

Is that correct? And was a "fsck -b 32 /dev/xxx" required to fix it
or did fsck correct the problem itself?

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 23:37:14
@@ -421,12 +421,18 @@
 	 */
 	newfs->fs_csp = fs->fs_csp;
 	newfs->fs_maxcluster = fs->fs_maxcluster;
+	newfs->fs_contigdirs = fs->fs_contigdirs;
 	bcopy(newfs, fs, (u_int)fs->fs_sbsize);
 	if (fs->fs_sbsize < SBSIZE)
 		bp->b_flags |= B_INVAL | B_NOCACHE;
 	brelse(bp);
 	mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen;
 	ffs_oldfscompat(fs);
+	/* An old fsck may have zeroed 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <200104240118.aa62225>