Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2019 23:53:56 +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: r345043 - head/sys/ufs/ffs
Message-ID:  <201903112353.x2BNruND013429@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Mon Mar 11 23:53:56 2019
New Revision: 345043
URL: https://svnweb.freebsd.org/changeset/base/345043

Log:
  Give more complete information in INVARIANTS panic messages at end of
  the ffs_truncate() function.
  
  Sponsored by: Netflix

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

Modified: head/sys/ufs/ffs/ffs_inode.c
==============================================================================
--- head/sys/ufs/ffs/ffs_inode.c	Mon Mar 11 23:27:50 2019	(r345042)
+++ head/sys/ufs/ffs/ffs_inode.c	Mon Mar 11 23:53:56 2019	(r345043)
@@ -594,15 +594,20 @@ done:
 #ifdef INVARIANTS
 	for (level = SINGLE; level <= TRIPLE; level++)
 		if (newblks[UFS_NDADDR + level] != DIP(ip, i_ib[level]))
-			panic("ffs_truncate1");
+			panic("ffs_truncate1: level %d newblks %jd != i_ib %jd",
+			    level, (intmax_t)newblks[UFS_NDADDR + level],
+			    (intmax_t)DIP(ip, i_ib[level]));
 	for (i = 0; i < UFS_NDADDR; i++)
 		if (newblks[i] != DIP(ip, i_db[i]))
-			panic("ffs_truncate2");
+			panic("ffs_truncate2: blkno %d newblks %jd != i_db %jd",
+			    i, (intmax_t)newblks[UFS_NDADDR + level],
+			    (intmax_t)DIP(ip, i_ib[level]));
 	BO_LOCK(bo);
 	if (length == 0 &&
 	    (fs->fs_magic != FS_UFS2_MAGIC || ip->i_din2->di_extsize == 0) &&
 	    (bo->bo_dirty.bv_cnt > 0 || bo->bo_clean.bv_cnt > 0))
-		panic("ffs_truncate3");
+		panic("ffs_truncate3: vp = %p, buffers: dirty = %d, clean = %d",
+			vp, bo->bo_dirty.bv_cnt, bo->bo_clean.bv_cnt);
 	BO_UNLOCK(bo);
 #endif /* INVARIANTS */
 	/*



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