summaryrefslogtreecommitdiff
path: root/sys/miscfs
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2020-06-08 08:04:11 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2020-06-08 08:04:11 +0000
commit77ac5fee71b6b751fa92e0f54c139279ab597df6 (patch)
treed78a144f1a3dc5e44e5579f24a3038a19f9904c0 /sys/miscfs
parent999f0686e0633f8b7bb9b76a14e47f5c20d2ea36 (diff)
Use a new EV_OLDAPI flag to match the behavior of poll(2) and select(2).
Adapt FS kqfilters to always return true when the flag is set and bypass the polling mechanism of the NFS thread. While here implement a write filter for NFS. ok visa@
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/fuse/fuse_vnops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c
index 6438cecd1c9..ab443aa1078 100644
--- a/sys/miscfs/fuse/fuse_vnops.c
+++ b/sys/miscfs/fuse/fuse_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fuse_vnops.c,v 1.59 2020/04/07 13:27:51 visa Exp $ */
+/* $OpenBSD: fuse_vnops.c,v 1.60 2020/06/08 08:04:09 mpi Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -188,6 +188,9 @@ filt_fusefsread(struct knote *kn, long hint)
return (1);
}
+ if (kn->kn_flags & EV_OLDAPI)
+ return (1);
+
return (kn->kn_data != 0);
}