svn commit: r304023 - head/sys/kern
Edward Tomasz Napierala
trasz at FreeBSD.org
Fri Aug 12 22:20:54 UTC 2016
Author: trasz
Date: Fri Aug 12 22:20:52 2016
New Revision: 304023
URL: https://svnweb.freebsd.org/changeset/base/304023
Log:
Print vnode details when vnode locking assertion gets triggered.
MFC after: 1 month
Modified:
head/sys/kern/vfs_subr.c
Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c Fri Aug 12 22:00:13 2016 (r304022)
+++ head/sys/kern/vfs_subr.c Fri Aug 12 22:20:52 2016 (r304023)
@@ -4402,6 +4402,10 @@ int vfs_badlock_print = 1; /* Print lock
SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print,
0, "Print lock violations");
+int vfs_badlock_vnode = 1; /* Print vnode details on lock violations. */
+SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_vnode, CTLFLAG_RW, &vfs_badlock_vnode,
+ 0, "Print vnode details on lock violations");
+
#ifdef KDB
int vfs_badlock_backtrace = 1; /* Print backtrace at lock violations. */
SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW,
@@ -4416,6 +4420,8 @@ vfs_badlock(const char *msg, const char
if (vfs_badlock_backtrace)
kdb_backtrace();
#endif
+ if (vfs_badlock_vnode)
+ vn_printf(vp, "vnode ");
if (vfs_badlock_print)
printf("%s: %p %s\n", str, (void *)vp, msg);
if (vfs_badlock_ddb)
More information about the svn-src-head
mailing list