aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2019-03-11 23:53:56 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2019-03-11 23:53:56 +0000
commit35327182573fcc82fa2da29b010a0e1d490e78a3 (patch)
tree351031bf45a6ed1d298017dd763fef14ee38c6ad /sys
parent1c37687de1d025bee93c1db75fcd5adc3644e35b (diff)
downloadsrc-35327182573fcc82fa2da29b010a0e1d490e78a3.tar.gz
src-35327182573fcc82fa2da29b010a0e1d490e78a3.zip
Give more complete information in INVARIANTS panic messages at end of
the ffs_truncate() function. Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=345043
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_inode.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index bbacaaa59e5f..ef2b2956933c 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -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 */
/*