diff options
author | iedowse <iedowse@FreeBSD.org> | 2002-01-02 00:41:26 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2002-01-02 00:41:26 +0000 |
commit | e90d2d4ddf8dc608bc2ee606bbf071a7893023da (patch) | |
tree | f9069aa388cb51b8744fafaa7600b9fe830fc575 /sys/nfsclient/nfs.h | |
parent | cc0e9cda251fbf87336f271d48a33f8ac7f91f37 (diff) | |
download | FreeBSD-src-e90d2d4ddf8dc608bc2ee606bbf071a7893023da.zip FreeBSD-src-e90d2d4ddf8dc608bc2ee606bbf071a7893023da.tar.gz |
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.
Diffstat (limited to 'sys/nfsclient/nfs.h')
-rw-r--r-- | sys/nfsclient/nfs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index bc228ed..ec0e6ac 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -276,6 +276,7 @@ int nfs_loadattrcache(struct vnode **, struct mbuf **, caddr_t *, struct vattr *, int); int nfsm_mbuftouio(struct mbuf **, struct uio *, int, caddr_t *); void nfs_nhinit(void); +int nfs_nmcancelreqs(struct nfsmount *); void nfs_timer(void*); int nfs_connect(struct nfsmount *, struct nfsreq *); void nfs_disconnect(struct nfsmount *); |