diff options
author | mohans <mohans@FreeBSD.org> | 2006-09-13 18:39:09 +0000 |
---|---|---|
committer | mohans <mohans@FreeBSD.org> | 2006-09-13 18:39:09 +0000 |
commit | 21daa650a97ea27eb3fdf3915832cb2c1e49aa4f (patch) | |
tree | ecb7983045b3f7e892ee6bce4b4f36f4080332f4 /sys/nfsclient/nfs_subs.c | |
parent | e751eb98323de041fcb2da0c3b6973368e75da67 (diff) | |
download | FreeBSD-src-21daa650a97ea27eb3fdf3915832cb2c1e49aa4f.zip FreeBSD-src-21daa650a97ea27eb3fdf3915832cb2c1e49aa4f.tar.gz |
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@
Diffstat (limited to 'sys/nfsclient/nfs_subs.c')
-rw-r--r-- | sys/nfsclient/nfs_subs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index 8556b3c..92dd32e 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); |