From owner-cvs-all Tue Jan 1 17:23:18 2002 Delivered-To: cvs-all@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 907FB37B41C; Tue, 1 Jan 2002 17:22:57 -0800 (PST) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.6/8.11.5) with SMTP id g021MsD17543; Tue, 1 Jan 2002 20:22:55 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Tue, 1 Jan 2002 20:22:54 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Ian Dowse Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/nfsclient nfs.h nfs_socket.c nfs_vfsops.c In-Reply-To: <200201020041.g020fQ973965@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Great, this is something I've hoped to see for ages. I'll try it in the office tomorrow :-). Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services On Tue, 1 Jan 2002, Ian Dowse wrote: > 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