aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient/nfs_subs.c
diff options
context:
space:
mode:
authorMohan Srinivasan <mohans@FreeBSD.org>2006-09-13 18:39:09 +0000
committerMohan Srinivasan <mohans@FreeBSD.org>2006-09-13 18:39:09 +0000
commit7d7d9e22427335af6d0ff1fe811ac085fb8bf204 (patch)
treeecb7983045b3f7e892ee6bce4b4f36f4080332f4 /sys/nfsclient/nfs_subs.c
parentcec65ede6c3990b5974f201c2c2ece974d037b0a (diff)
Fixes up the handling of shared vnode lock lookups in the NFS client,
adds a FS type specific flag indicating that the FS supports shared vnode lock lookups, adds some logic in vfs_lookup.c to test this flag and set lock flags appropriately. - amd on 6.x is a non-starter (without this change). Using amd under heavy load results in a deadlock (with cascading vnode locks all the way to the root) very quickly. - This change should also fix the more general problem of cascading vnode deadlocks when an NFS server goes down. Ideally, we wouldn't need these changes, as enabling shared vnode lock lookups globally would work. Unfortunately, UFS, for example isn't ready for shared vnode lock lookups, crashing pretty quickly. This change is the result of discussions with Stephan Uphoff (ups@). Reviewed by: ups@
Notes
Notes: svn path=/head/; revision=162288
Diffstat (limited to 'sys/nfsclient/nfs_subs.c')
-rw-r--r--sys/nfsclient/nfs_subs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index 8556b3c902ba..92dd32e272ad 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -930,7 +930,7 @@ nfsm_mtofh_xx(struct vnode *d, struct vnode **v, int v3, int *f,
t1 = nfsm_getfh_xx(&ttfhp, &ttfhsize, (v3), md, dpos);
if (t1 != 0)
return t1;
- t1 = nfs_nget(d->v_mount, ttfhp, ttfhsize, &ttnp);
+ t1 = nfs_nget(d->v_mount, ttfhp, ttfhsize, &ttnp, LK_EXCLUSIVE);
if (t1 != 0)
return t1;
*v = NFSTOV(ttnp);