freebsd-nq/sys/nfsclient
Ian Dowse 1278d57acd Permit NFS filesystems to be forcibly unmounted when the server is
down, even if there are hung processes and the mount is non-
interruptible.

This works by having nfs_unmount call a new function nfs_nmcancelreqs()
in the FORCECLOSE case. It scans the list of outstanding requests
and marks as interrupted any requests belonging to the specified
mount. Then it waits up to 30 seconds for all requests to terminate.
A few other changes are necessary to support this:
- Unconditionally set a socket timeout so that even hard mounts
  are guaranteed to occasionally check the R_SOFTTERM flag on
  requests. For hard mounts this flag can only be set by
  nfs_nmcancelreqs().
- Reject requests on a mount that is currently being unmounted.
- Never grant the receive lock to a request that has been cancelled.

This should also avoid an old problem where a forced NFS unmount
could cause a crash; it occurred when a VOP on an unlocked vnode
(usually VOP_GETATTR) was in progress at the time of the forced
unmount.
2002-01-02 00:41:26 +00:00
..
bootp_subr.c o Add missing #include's of sys/proc.h, missed in merge, required to 2001-12-31 20:05:26 +00:00
krpc_subr.c o Add missing #include's of sys/proc.h, missed in merge, required to 2001-12-31 20:05:26 +00:00
krpc.h Cleanup and split of nfs client and server code. 2001-09-18 23:32:09 +00:00
nfs_bio.c This fixes a large number of bugs in our NFS client side code. A recent 2001-12-14 01:16:57 +00:00
nfs_lock.c o Modify nfslockdans() to accept a thread reference instead of a proc 2001-11-14 18:20:45 +00:00
nfs_lock.h o Modify nfslockdans() to accept a thread reference instead of a proc 2001-11-14 18:20:45 +00:00
nfs_nfsiod.c o Modify nfslockdans() to accept a thread reference instead of a proc 2001-11-14 18:20:45 +00:00
nfs_node.c nfs_nget() does no locking whatsoever when looking up a vnode. If the 2001-12-27 19:40:34 +00:00
nfs_socket.c Permit NFS filesystems to be forcibly unmounted when the server is 2002-01-02 00:41:26 +00:00
nfs_subs.c Avoid passing the variable `tl' to functions that just use it for 2001-12-18 01:22:09 +00:00
nfs_vfsops.c Permit NFS filesystems to be forcibly unmounted when the server is 2002-01-02 00:41:26 +00:00
nfs_vnops.c Avoid passing the variable `tl' to functions that just use it for 2001-12-18 01:22:09 +00:00
nfs.h Permit NFS filesystems to be forcibly unmounted when the server is 2002-01-02 00:41:26 +00:00
nfsargs.h Allow users to use the 'nolockd' or -L options with mount_nfs in order 2001-11-12 02:33:52 +00:00
nfsdiskless.h Cleanup and split of nfs client and server code. 2001-09-18 23:32:09 +00:00
nfsm_subs.h Avoid passing the variable `tl' to functions that just use it for 2001-12-18 01:22:09 +00:00
nfsmount.h o Make the credential used by socreate() an explicit argument to 2001-12-31 17:45:16 +00:00
nfsnode.h Cleanup and split of nfs client and server code. 2001-09-18 23:32:09 +00:00
nfsstats.h Cleanup and split of nfs client and server code. 2001-09-18 23:32:09 +00:00
nlminfo.h Cleanup and split of nfs client and server code. 2001-09-18 23:32:09 +00:00