diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-11-24 11:53:16 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-11-24 11:53:16 +0000 |
commit | 65d3526a649a6b8c43d95db3632ccd500d0435e7 (patch) | |
tree | e361363025d1a88f47fe0ef4f20658e774c2ac7d /sys/nfsserver/nfs.h | |
parent | 3caf2aa43d126fdf7524e1e18b68a6859dcbbf41 (diff) | |
download | FreeBSD-src-65d3526a649a6b8c43d95db3632ccd500d0435e7.zip FreeBSD-src-65d3526a649a6b8c43d95db3632ccd500d0435e7.tar.gz |
Push Giant a bit further off the NFS server in a number of straight
forward cases by converting from unconditional acquisition of Giant
around vnode operations to conditional acquisition:
- Remove nfsrv_access_withgiant(), and cause nfsrv_access() to now
assert that Giant will be held if it is required for the vnode.
- Add nfsrv_fhtovp_locked(), which will drop the NFS server lock if
required, and modify nfsrv_fhtovp() to conditionally acquire
Giant if required.
- In the VOP's not dealing with more than one vnode at a time (i.e.,
not involving a lookup), conditionally acquire Giant.
This removes Giant use for MPSAFE file systems for a number of quite
important RPCs, including getattr, read, write. It leaves
unconditional Giant acquisitions in vnode operations that interact
with the name space or more than one vnode at a time as these
require further work.
Tested by: kris
Reviewed by: kib
Diffstat (limited to 'sys/nfsserver/nfs.h')
-rw-r--r-- | sys/nfsserver/nfs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h index c3b231a..292584e 100644 --- a/sys/nfsserver/nfs.h +++ b/sys/nfsserver/nfs.h @@ -360,6 +360,9 @@ int nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct thread *td, struct mbuf **mrq); int nfsrv_fhtovp(fhandle_t *, int, struct vnode **, struct ucred *, struct nfssvc_sock *, struct sockaddr *, int *, int); +int nfsrv_fhtovp_locked(fhandle_t *, int, struct vnode **, + struct ucred *, struct nfssvc_sock *, struct sockaddr *, int *, + int); int nfsrv_setpublicfs(struct mount *, struct netexport *, struct export_args *); int nfs_ispublicfh(fhandle_t *); |