NetBSD/sys/nfs
ad 42d0626726 PR kern/38141 lookup/vfs_busy acquire rwlock recursively
Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.
2008-05-06 18:43:44 +00:00
..
Makefile
files.nfs
krpc.h
krpc_subr.c Merge the socket locking patch: 2008-04-24 11:38:36 +00:00
nfs.h merge non-intrusive nfs changes from vmlocking. 2007-12-04 17:42:30 +00:00
nfs_bio.c Network protocol interrupts can now block on locks, so merge the globals 2008-04-24 15:35:27 +00:00
nfs_boot.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nfs_bootdhcp.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nfs_bootparam.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nfs_bootstatic.c Add a new BOOTSTATIC flag, NFS_BOOTSTATIC_NOSTATIC, which causes 2007-07-08 21:08:09 +00:00
nfs_export.c PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
nfs_kq.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nfs_node.c - Convert hashinit() to use kmem_alloc(). The hash tables can be large 2008-05-05 17:11:16 +00:00
nfs_serv.c Yet another rename workaround - this time check for . and .. early because 2008-03-28 05:02:08 +00:00
nfs_socket.c Merge the socket locking patch: 2008-04-24 11:38:36 +00:00
nfs_srvcache.c - Convert hashinit() to use kmem_alloc(). The hash tables can be large 2008-05-05 17:11:16 +00:00
nfs_subs.c - Convert hashinit() to use kmem_alloc(). The hash tables can be large 2008-05-05 17:11:16 +00:00
nfs_syscalls.c as softint network processing is now safe to block, 2008-04-28 15:06:51 +00:00
nfs_var.h Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nfs_vfsops.c PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
nfs_vnops.c reject files larger than nm_maxfilesize. 2008-02-13 09:51:37 +00:00
nfsdiskless.h Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nfsm_subs.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
nfsmount.h * nuke the nameidata parameter from VFS_MOUNT(). Nobody on tech-kern 2007-07-31 21:14:15 +00:00
nfsnode.h Remove VOP_LEASE. Discussed on tech-kern. 2008-01-25 14:32:11 +00:00
nfsproto.h
nfsrtt.h
nfsrvcache.h merge non-intrusive nfs changes from vmlocking. 2007-12-04 17:42:30 +00:00
rpcv2.h
xdr_subs.h