diff options
author | ssouhlal <ssouhlal@FreeBSD.org> | 2005-06-09 20:20:31 +0000 |
---|---|---|
committer | ssouhlal <ssouhlal@FreeBSD.org> | 2005-06-09 20:20:31 +0000 |
commit | 0835f7b4a9a7e80823912ce250d4082b5a23a401 (patch) | |
tree | f884ddce34ea556a36562577b6b807ab201ffb03 /sys/ufs/ffs | |
parent | bf3a7d1c45580ecf11f34f58fcdb57fba76c9d40 (diff) | |
download | FreeBSD-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/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 13b6272..c7808f0 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -572,7 +572,7 @@ ffs_write(ap) ufs_lbn_t lbn; off_t osize; int seqcount; - int blkoffset, error, extended, flags, ioflag, resid, size, xfersize; + int blkoffset, error, flags, ioflag, resid, size, xfersize; vp = ap->a_vp; uio = ap->a_uio; @@ -584,7 +584,6 @@ ffs_write(ap) panic("ffs_write+IO_EXT"); #endif - extended = 0; seqcount = ap->a_ioflag >> IO_SEQSHIFT; ip = VTOI(vp); @@ -681,7 +680,6 @@ ffs_write(ap) if (uio->uio_offset + xfersize > ip->i_size) { ip->i_size = uio->uio_offset + xfersize; DIP_SET(ip, i_size, ip->i_size); - extended = 1; } size = blksize(fs, ip, lbn) - bp->b_resid; @@ -737,8 +735,6 @@ ffs_write(ap) ip->i_mode &= ~(ISUID | ISGID); DIP_SET(ip, i_mode, ip->i_mode); } - if (resid > uio->uio_resid) - VN_KNOTE_UNLOCKED(vp, NOTE_WRITE | (extended ? NOTE_EXTEND : 0)); if (error) { if (ioflag & IO_UNIT) { (void)ffs_truncate(vp, osize, |