diff options
author | jeff <jeff@FreeBSD.org> | 2002-06-28 20:58:14 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-06-28 20:58:14 +0000 |
commit | 1ed9e0f3759b38531dd3735e14ab04f36afb0941 (patch) | |
tree | 32f110f5a8a14ee922bff54789ce1da2322cd005 /sys/kern/vfs_subr.c | |
parent | 792737cf4d98d3af06c2946642a2cf3409e03e1b (diff) | |
download | FreeBSD-src-1ed9e0f3759b38531dd3735e14ab04f36afb0941.zip FreeBSD-src-1ed9e0f3759b38531dd3735e14ab04f36afb0941.tar.gz |
Improve the VOP locking asserts
- Add vfs_badlock_print to control whether or not we print lock violations
- Add vfs_badlock_panic to control whether we panic on lock violations
Both default to on to mimic the original behavior if DEBUG_VFS_LOCKS is on.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d75321c..a4581df 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -236,6 +236,13 @@ static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); +#ifdef DEBUG_VFS_LOCKS +/* Print lock violations */ +int vfs_badlock_print = 1; +/* Panic on violation */ +int vfs_badlock_panic = 1; +#endif + void v_addpollinfo(struct vnode *vp) { |