diff options
author | jhb <jhb@FreeBSD.org> | 2009-01-21 14:42:00 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-01-21 14:42:00 +0000 |
commit | 47455a7b41fddec8ed401d12470434bd77477189 (patch) | |
tree | e58a2689a5a9b34097c0a3907a9c3f83d2c56940 /sys/kern | |
parent | fd1ff02af8d6981027dd9a4fa0fe479822e179a4 (diff) | |
download | FreeBSD-src-47455a7b41fddec8ed401d12470434bd77477189.zip FreeBSD-src-47455a7b41fddec8ed401d12470434bd77477189.tar.gz |
Move the VA_MARKATIME flag for VOP_SETATTR() out into its own VOP:
VOP_MARKATIME() since unlike the rest of VOP_SETATTR(), VA_MARKATIME
can be performed while holding a shared vnode lock (the same functionality
is done internally by VOP_READ which can run with a shared vnode lock).
Add missing locking of the vnode interlock to the ufs implementation and
remove a special note and test from the NFS client about not supporting the
feature.
Inspired by: ups
Tested by: pho
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_subr.c | 7 | ||||
-rw-r--r-- | sys/kern/vnode_if.src | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 1e4bf90..753f95f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4206,18 +4206,15 @@ vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off) /* * Mark for update the access time of the file if the filesystem - * supports VA_MARK_ATIME. This functionality is used by execve + * supports VOP_MARKATIME. This functionality is used by execve * and mmap, so we want to avoid the synchronous I/O implied by * directly setting va_atime for the sake of efficiency. */ void vfs_mark_atime(struct vnode *vp, struct ucred *cred) { - struct vattr atimeattr; if ((vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0) { - VATTR_NULL(&atimeattr); - atimeattr.va_vaflags |= VA_MARK_ATIME; - (void)VOP_SETATTR(vp, &atimeattr, cred); + (void)VOP_MARKATIME(vp); } } diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 36ea434..ad4d1f7 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -171,6 +171,11 @@ vop_setattr { IN struct ucred *cred; }; +%% markatime vp L L L + +vop_markatime { + IN struct vnode *vp; +}; %% read vp L L L |