diff options
author | mckusick <mckusick@FreeBSD.org> | 2002-03-17 01:25:47 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2002-03-17 01:25:47 +0000 |
commit | 14dd08fd153468502c32dc2d9c1e25a6c2d761d1 (patch) | |
tree | ee06559e7b5061e6fc6cf074dfca793dd31c681b /sys/fs/nullfs | |
parent | 34dcf8975d103d034d7e8b6788c0645cc93af254 (diff) | |
download | FreeBSD-src-14dd08fd153468502c32dc2d9c1e25a6c2d761d1.zip FreeBSD-src-14dd08fd153468502c32dc2d9c1e25a6c2d761d1.tar.gz |
Add a flags parameter to VFS_VGET to pass through the desired
locking flags when acquiring a vnode. The immediate purpose is
to allow polling lock requests (LK_NOWAIT) needed by soft updates
to avoid deadlock when enlisting other processes to help with
the background cleanup. For the future it will allow the use of
shared locks for read access to vnodes. This change touches a
lot of files as it affects most filesystems within the system.
It has been well tested on FFS, loopback, and CD-ROM filesystems.
only lightly on the others, so if you find a problem there, please
let me (mckusick@mckusick.com) know.
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 1ab0aaa..d0a1ed1 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -73,7 +73,8 @@ static int nullfs_statfs(struct mount *mp, struct statfs *sbp, static int nullfs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct thread *td); static int nullfs_unmount(struct mount *mp, int mntflags, struct thread *td); -static int nullfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp); +static int nullfs_vget(struct mount *mp, ino_t ino, int flags, + struct vnode **vpp); static int nullfs_vptofh(struct vnode *vp, struct fid *fhp); static int nullfs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, @@ -344,13 +345,14 @@ nullfs_sync(mp, waitfor, cred, td) } static int -nullfs_vget(mp, ino, vpp) +nullfs_vget(mp, ino, flags, vpp) struct mount *mp; ino_t ino; + int flags; struct vnode **vpp; { int error; - error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, vpp); + error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp); if (error) return (error); |