From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 17:49:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 135B71065699 for ; Thu, 6 Mar 2008 17:49:49 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id EAF178FC29 for ; Thu, 6 Mar 2008 17:49:48 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m26Hnm9G092633 for ; Thu, 6 Mar 2008 09:49:48 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m26HnmDb092632 for freebsd-hackers@freebsd.org; Thu, 6 Mar 2008 09:49:48 -0800 (PST) (envelope-from obrien) Date: Thu, 6 Mar 2008 09:49:48 -0800 From: "David O'Brien" To: freebsd-hackers@freebsd.org Message-ID: <20080306174948.GA92538@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: cvs commit: src/sys/nfsclient nfs_socket.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 17:49:49 -0000 On Tue, Aug 29, 2006 at 10:00:12PM +0000, Mohan Srinivasan wrote: > mohans 2006-08-29 22:00:12 UTC > FreeBSD src repository > Modified files: > sys/nfsclient nfs_socket.c > Log: > Fix for a deadlock triggered by a 'umount -f' causing a NFS request to never > retransmit (or return). Thanks to John Baldwin for helping nail this one. > Revision Changes Path > 1.144 +14 -2 src/sys/nfsclient/nfs_socket.c > http://cvsweb.freebsd.org/src/sys/nfsclient/nfs_socket.c.diff?r1=1.143&r2=1.144 How does this look for a RELENG_6 version of this fix? Index: nfsclient/nfs_socket.c =================================================================== RCS file: /home/ncvs/src/sys/nfsclient/nfs_socket.c,v retrieving revision 1.125.2.18 diff -u -p -r1.125.2.18 nfs_socket.c --- nfsclient/nfs_socket.c 17 Jan 2008 21:04:51 -0000 1.125.2.18 +++ nfsclient/nfs_socket.c 25 Feb 2008 10:26:59 -0000 @@ -1323,6 +1323,18 @@ nfs_timer(void *arg) continue; if (nfs_sigintr(nmp, rep, rep->r_td)) continue; + else { + /* + * Terminate request if force-unmount in progress. + * Note that NFS could have vfs_busy'ed the mount, + * causing the unmount to wait for the mnt_lock, making + * this bit of logic necessary. + */ + if (rep->r_nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) { + nfs_softterm(rep); + continue; + } + } if (nmp->nm_tprintf_initial_delay != 0 && (rep->r_rexmit > 2 || (rep->r_flags & R_RESENDERR)) && rep->r_lastmsg + nmp->nm_tprintf_delay < now.tv_sec) {