summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authorssouhlal <ssouhlal@FreeBSD.org>2005-06-09 20:20:31 +0000
committerssouhlal <ssouhlal@FreeBSD.org>2005-06-09 20:20:31 +0000
commit0835f7b4a9a7e80823912ce250d4082b5a23a401 (patch)
treef884ddce34ea556a36562577b6b807ab201ffb03 /sys/tools
parentbf3a7d1c45580ecf11f34f58fcdb57fba76c9d40 (diff)
downloadFreeBSD-src-0835f7b4a9a7e80823912ce250d4082b5a23a401.zip
FreeBSD-src-0835f7b4a9a7e80823912ce250d4082b5a23a401.tar.gz
Allow EVFILT_VNODE events to work on every filesystem type, not just
UFS by: - Making the pre and post hooks for the VOP functions work even when DEBUG_VFS_LOCKS is not defined. - Moving the KNOTE activations into the corresponding VOP hooks. - Creating a MNTK_NOKNOTE flag for the mnt_kern_flag field of struct mount that permits filesystems to disable the new behavior. - Creating a default VOP_KQFILTER function: vfs_kqfilter() My benchmarks have not revealed any performance degradation. Reviewed by: jeff, bde Approved by: rwatson, jmg (kqueue changes), grehan (mentor)
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/vnode_if.awk15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk
index 2d6d1e1..8c992fe 100644
--- a/sys/tools/vnode_if.awk
+++ b/sys/tools/vnode_if.awk
@@ -89,21 +89,17 @@ function add_debug_code(name, arg, pos, ind)
}
}
-function add_debug_pre(name)
+function add_pre(name)
{
if (lockdata[name, "pre"]) {
- printc("#ifdef DEBUG_VFS_LOCKS");
printc("\t"lockdata[name, "pre"]"(a);");
- printc("#endif");
}
}
-function add_debug_post(name)
+function add_post(name)
{
if (lockdata[name, "post"]) {
- printc("#ifdef DEBUG_VFS_LOCKS");
printc("\t"lockdata[name, "post"]"(a, rc);");
- printc("#endif");
}
}
@@ -174,9 +170,10 @@ if (hfile) {
if (cfile) {
printc(common_head \
"#include <sys/param.h>\n" \
+ "#include <sys/event.h>\n" \
+ "#include <sys/mount.h>\n" \
"#include <sys/systm.h>\n" \
"#include <sys/vnode.h>\n" \
- "#include <sys/systm.h>\n" \
"\n" \
"struct vnodeop_desc vop_default_desc = {\n" \
" \"default\",\n" \
@@ -369,7 +366,7 @@ while ((getline < srcfile) > 0) {
printc("\tVNASSERT(vop != NULL, a->a_" args[0]", (\"No "name"(%p, %p)\", a->a_" args[0]", a));")
for (i = 0; i < numargs; ++i)
add_debug_code(name, args[i], "Entry", "\t");
- add_debug_pre(name);
+ add_pre(name);
printc("\tif (vop->"name" != NULL)")
printc("\t\trc = vop->"name"(a);")
printc("\telse")
@@ -382,7 +379,7 @@ while ((getline < srcfile) > 0) {
for (i = 0; i < numargs; ++i)
add_debug_code(name, args[i], "Error", "\t\t");
printc("\t}");
- add_debug_post(name);
+ add_post(name);
printc("\treturn (rc);");
printc("}\n");
OpenPOWER on IntegriCloud