diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-11-22 00:35:30 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-11-22 00:35:30 +0000 |
commit | b0d439f34e326dd61912033a3a61bff5d4a88be6 (patch) | |
tree | e7304ed4bacaa2964d24f0b967f2cb68fc949f32 | |
parent | 7eb95f50e380e785a18aaee6734807ee6db226a6 (diff) | |
download | FreeBSD-src-b0d439f34e326dd61912033a3a61bff5d4a88be6.zip FreeBSD-src-b0d439f34e326dd61912033a3a61bff5d4a88be6.tar.gz |
This patch enables the new/default NFS server's use of shared
vnode locking for read, readdir, readlink, getattr and access.
It is hoped that this will improve server performance for these
operations, since they will no longer be serialized for a given
file/vnode.
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdport.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 442bc54..f30d051 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -2624,7 +2624,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_t *fhp, struct sockaddr *nam, if (VFS_NEEDSGIANT(mp)) error = ESTALE; else - error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, lktype, vpp); if (error != 0) /* Make sure the server replies ESTALE to the client. */ error = ESTALE; @@ -2645,14 +2645,6 @@ nfsvno_fhtovp(struct mount *mp, fhandle_t *fhp, struct sockaddr *nam, exp->nes_secflavors[i] = secflavors[i]; } } - if (error == 0 && lktype == LK_SHARED) - /* - * It would be much better to pass lktype to VFS_FHTOVP(), - * but this will have to do until VFS_FHTOVP() has a lock - * type argument like VFS_VGET(). - */ - NFSVOPLOCK(*vpp, LK_DOWNGRADE | LK_RETRY); - NFSEXITCODE(error); return (error); } |