svn commit: r345043 - head/sys/ufs/ffs
Kirk McKusick
mckusick at FreeBSD.org
Mon Mar 11 23:53:57 UTC 2019
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 */
/*
More information about the svn-src-all
mailing list