From 0835f7b4a9a7e80823912ce250d4082b5a23a401 Mon Sep 17 00:00:00 2001 From: ssouhlal Date: Thu, 9 Jun 2005 20:20:31 +0000 Subject: 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) --- sys/kern/vfs_default.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys/kern/vfs_default.c') diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 32f3f9b..2336438 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -82,6 +83,7 @@ struct vop_vector default_vnodeops = { .vop_getwritemount = vop_stdgetwritemount, .vop_inactive = VOP_NULL, .vop_ioctl = VOP_ENOTTY, + .vop_kqfilter = vop_stdkqfilter, .vop_islocked = vop_stdislocked, .vop_lease = VOP_NULL, .vop_lock = vop_stdlock, @@ -464,6 +466,12 @@ vop_stdgetpages(ap) ap->a_count, ap->a_reqpage); } +int +vop_stdkqfilter(struct vop_kqfilter_args *ap) +{ + return vfs_kqfilter(ap); +} + /* XXX Needs good comment and more info in the manpage (VOP_PUTPAGES(9)). */ int vop_stdputpages(ap) -- cgit v1.1