Date: Thu, 3 Nov 2016 15:04:17 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r308260 - stable/11/sys/kern Message-ID: <201611031504.uA3F4Hhf020779@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Nov 3 15:04:16 2016 New Revision: 308260 URL: https://svnweb.freebsd.org/changeset/base/308260 Log: MFC r304023: Print vnode details when vnode locking assertion gets triggered. Modified: stable/11/sys/kern/vfs_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Thu Nov 3 15:01:23 2016 (r308259) +++ stable/11/sys/kern/vfs_subr.c Thu Nov 3 15:04:16 2016 (r308260) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611031504.uA3F4Hhf020779>