diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2020-09-15 22:06:36 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2020-09-15 22:06:36 +0000 |
commit | 3c484f325e60e961c476dfb6ebd992290667d6dd (patch) | |
tree | 2d952012e6511531fbcff7fbb1b2ce57aa2791a5 /sys/kern/vfs_subr.c | |
parent | 888636655ddddb9e8ae3afb998c72fd2c99f63d5 (diff) | |
download | src-3c484f325e60e961c476dfb6ebd992290667d6dd.tar.gz src-3c484f325e60e961c476dfb6ebd992290667d6dd.zip |
Convert page cache read to VOP.
There are several negative side-effects of not calling into VOP layer
at all for page cache reads. The biggest is the missed activation of
EVFILT_READ knotes.
Also, it allows filesystem to make more fine grained decision to
refuse read from page cache.
Keep VIRF_PGREAD flag around, it is still useful for nullfs, and for
asserts.
Reviewed by: markj
Tested by: pho
Discussed with: mjg
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D26346
Notes
Notes:
svn path=/head/; revision=365785
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 34f35f3638d0..6956a8f55e89 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -5839,6 +5839,15 @@ vop_read_post(void *ap, int rc) } void +vop_read_pgcache_post(void *ap, int rc) +{ + struct vop_read_pgcache_args *a = ap; + + if (!rc) + VFS_KNOTE_UNLOCKED(a->a_vp, NOTE_READ); +} + +void vop_readdir_post(void *ap, int rc) { struct vop_readdir_args *a = ap; |