svn commit: r215115 - head/sys/ufs/ffs

Konstantin Belousov kib at FreeBSD.org
Thu Nov 11 11:41:52 UTC 2010


Author: kib
Date: Thu Nov 11 11:41:52 2010
New Revision: 215115
URL: http://svn.freebsd.org/changeset/base/215115

Log:
  Change #ifdef INVARIANTS panic into KASSERT, and print some useful
  information to diagnose the issue, in handle_complete_freeblocks().
  
  Reviewed by:	jeff
  Tested by:	pho

Modified:
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- head/sys/ufs/ffs/ffs_softdep.c	Thu Nov 11 11:38:57 2010	(r215114)
+++ head/sys/ufs/ffs/ffs_softdep.c	Thu Nov 11 11:41:52 2010	(r215115)
@@ -6021,11 +6021,11 @@ handle_complete_freeblocks(freeblks)
 		vput(vp);
 	}
 
-#ifdef INVARIANTS
-	if (freeblks->fb_chkcnt != 0 && 
-	    ((fs->fs_flags & FS_UNCLEAN) == 0 || (flags & LK_NOWAIT) != 0))
-		printf("handle_workitem_freeblocks: block count\n");
-#endif /* INVARIANTS */
+	KASSERT(freeblks->fb_chkcnt == 0 ||
+	    ((fs->fs_flags & FS_UNCLEAN) != 0 && (flags & LK_NOWAIT) == 0),
+	    ("handle_workitem_freeblocks: inode %ju block count %jd\n",
+	    (uintmax_t)freeblks->fb_previousinum,
+	    (intmax_t)freeblks->fb_chkcnt));
 
 	ACQUIRE_LOCK(&lk);
 	/*


More information about the svn-src-all mailing list