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) {

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to