summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_default.c
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/kern/vfs_default.c
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/kern/vfs_default.c')
-rw-r--r--sys/kern/vfs_default.c8
1 files changed, 8 insertions, 0 deletions
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 <sys/bio.h>
#include <sys/buf.h>
#include <sys/conf.h>
+#include <sys/event.h>
#include <sys/kernel.h>
#include <sys/limits.h>
#include <sys/lock.h>
@@ -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)
OpenPOWER on IntegriCloud