Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2010 01:10:49 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r201708 - head/sbin/fsck_ffs
Message-ID:  <201001070110.o071AoeD096476@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Thu Jan  7 01:10:49 2010
New Revision: 201708
URL: http://svn.freebsd.org/changeset/base/201708

Log:
  Add some error messages suggested in PR bin/138043. The code to
  correct the problem was added in r176575 by delphij on 2008-02-25.
  
  PR:		138043
  Reported by:	Heikki Suonsivu

Modified:
  head/sbin/fsck_ffs/main.c
  head/sbin/fsck_ffs/pass1.c

Modified: head/sbin/fsck_ffs/main.c
==============================================================================
--- head/sbin/fsck_ffs/main.c	Thu Jan  7 00:57:40 2010	(r201707)
+++ head/sbin/fsck_ffs/main.c	Thu Jan  7 01:10:49 2010	(r201708)
@@ -406,7 +406,10 @@ checkfilesys(char *filesys)
 	 */
 	if (duplist) {
 		if (preen || usedsoftdep)
-			pfatal("INTERNAL ERROR: dups with -p");
+			pfatal("INTERNAL ERROR: dups with %s%s%s",
+			    preen ? "-p" : "",
+			    (preen && usedsoftdep) ? " and " : "",
+			    usedsoftdep ? "softupdates" : "");
 		printf("** Phase 1b - Rescan For More DUPS\n");
 		pass1b();
 	}

Modified: head/sbin/fsck_ffs/pass1.c
==============================================================================
--- head/sbin/fsck_ffs/pass1.c	Thu Jan  7 00:57:40 2010	(r201707)
+++ head/sbin/fsck_ffs/pass1.c	Thu Jan  7 01:10:49 2010	(r201708)
@@ -98,10 +98,16 @@ pass1(void)
 			rebuildcg = 1;
 		if (!rebuildcg && sblock.fs_magic == FS_UFS2_MAGIC) {
 			inosused = cgrp.cg_initediblk;
-			if (inosused > sblock.fs_ipg)
+			if (inosused > sblock.fs_ipg) {
+				pfatal("%s (%d > %d) %s %d\nReset to %d\n",
+				    "Too many initialized inodes", inosused,
+				    sblock.fs_ipg, "in cylinder group", c,
+				    sblock.fs_ipg);
 				inosused = sblock.fs_ipg;
-		} else
+			}
+		} else {
 			inosused = sblock.fs_ipg;
+		}
 		if (got_siginfo) {
 			printf("%s: phase 1: cyl group %d of %d (%d%%)\n",
 			    cdevname, c, sblock.fs_ncg,



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