diff options
author | iedowse <iedowse@FreeBSD.org> | 2002-04-17 01:07:29 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2002-04-17 01:07:29 +0000 |
commit | 64322dabea69a0542951fed96cb8bb7c81602b56 (patch) | |
tree | fd4db1996177f18b62183e61df1a1e3dae92eb51 /sys/nfsclient | |
parent | 366464c33c243b21ec0040bc08c326d02b8630a9 (diff) | |
download | FreeBSD-src-64322dabea69a0542951fed96cb8bb7c81602b56.zip FreeBSD-src-64322dabea69a0542951fed96cb8bb7c81602b56.tar.gz |
The recent NFS forced unmount improvements introduced a side-effect
where some client operations might be unexpectedly cancelled during
an unsuccessful non-forced unmount attempt. This causes problems
for amd(8), because it periodically attempts a non-forced unmount
to check if the filesystem is still in use.
Fix this by adding a new mountpoint flag MNTK_UNMOUNTF that is set
only during the operation of a forced unmount. Use this instead of
MNTK_UNMOUNT to trigger the cancellation of hung NFS operations.
Also correct a problem where dounmount() might inadvertently clear
the MNTK_UNMOUNT flag.
Reported by: simokawa
MFC after: 1 week
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 73ecf47..0a4f849 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -850,8 +850,8 @@ nfs_request(struct vnode *vp, struct mbuf *mrest, int procnum, int trylater_delay = NQ_TRYLATERDEL, trylater_cnt = 0; u_int32_t xid; - /* Reject requests while attempting to unmount. */ - if (vp->v_mount->mnt_kern_flag & MNTK_UNMOUNT) { + /* Reject requests while attempting a forced unmount. */ + if (vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) { m_freem(mrest); return (ESTALE); } @@ -1230,8 +1230,8 @@ nfs_sigintr(struct nfsmount *nmp, struct nfsreq *rep, struct proc *p) if (rep && (rep->r_flags & R_SOFTTERM)) return (EINTR); - /* Terminate all requests while attempting to unmount. */ - if (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNT) + /* Terminate all requests while attempting a forced unmount. */ + if (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) return (EINTR); if (!(nmp->nm_flag & NFSMNT_INT)) return (0); |