From owner-cvs-all Tue Jan 1 16:41:31 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0715837B429; Tue, 1 Jan 2002 16:41:27 -0800 (PST) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g020fQ973965; Tue, 1 Jan 2002 16:41:26 -0800 (PST) (envelope-from iedowse) Message-Id: <200201020041.g020fQ973965@freefall.freebsd.org> From: Ian Dowse Date: Tue, 1 Jan 2002 16:41:26 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/nfsclient nfs.h nfs_socket.c nfs_vfsops.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iedowse 2002/01/01 16:41:26 PST Modified files: sys/nfsclient nfs.h nfs_socket.c nfs_vfsops.c Log: 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. Revision Changes Path 1.66 +1 -0 src/sys/nfsclient/nfs.h 1.74 +45 -7 src/sys/nfsclient/nfs_socket.c 1.114 +6 -0 src/sys/nfsclient/nfs_vfsops.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message