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
This commit is contained in:
Konstantin Belousov 2010-11-11 11:41:52 +00:00
parent d23c72cdb5
commit 496fd81362

View File

@ -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);
/*