Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jul 2001 09:48:21 -0700 (PDT)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Ian Dowse <iedowse@maths.tcd.ie>
Cc:        Maxim Sobolev <sobomax@FreeBSD.ORG>, current@FreeBSD.ORG
Subject:   Re: NFS client unable to recover from server crash 
Message-ID:  <200107231648.f6NGmLP17709@earth.backplane.com>
References:   <200107231712.aa22684@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
   Ian, please don't do this.  The whole point of having an uninterruptable
   mount is so the client can survive a server reboot or network failure.
   Doing this destroys uninterruptable semantics.

   If you want to flag uninterruptable mounts in a special way when someone
   tries to umount them then I'm all for it.  But for the general case this
   code is bad news.

					-Matt


: 	if (nmp->nm_flag & (NFSMNT_SOFT | NFSMNT_INT)) {
:-		so->so_rcv.sb_timeo = (5 * hz);
:-		so->so_snd.sb_timeo = (5 * hz);
:+		so->so_rcv.sb_timeo = (2 * hz);
:+		so->so_snd.sb_timeo = (2 * hz);
: 	} else {
:-		so->so_rcv.sb_timeo = 0;
:-		so->so_snd.sb_timeo = 0;
:+		/*
:+		 * We would normally set the timeouts to 0 (never time out)
:+		 * for non-interruptible mounts. However, nfs_nmcancelreqs()
:+		 * can still prematurely terminate requests, so avoid
:+		 * waiting forever.
:+		 */
:+		so->so_rcv.sb_timeo = 10 * hz;
:+		so->so_snd.sb_timeo = 10 * hz;
: 	}
: 
: 	/*
:@@ -1400,10 +1407,18 @@
: 	for (rep = nfs_reqq.tqh_first; rep != 0; rep = rep->r_chain.tqe_next) {
: 		nmp = rep->r_nmp;
: 		if (rep->r_mrep || (rep->r_flags & R_SOFTTERM))
:-			continue;
:-		if (nfs_sigintr(nmp, rep, rep->r_procp)) {
:-			nfs_softterm(rep);
: 			continue;
:+		/*
:+		 * Test for signals on interruptible mounts. We try to
:+		 * maintain normal (uninterruptible) semantics while the
:+		 * server is up, but respond quickly to signals when it
:+		 * is down.
:+		 */
:+		if (nmp->nm_timeouts >= NFS_NBACKOFF / 2) {
:+			if (nfs_sigintr(nmp, rep, rep->r_procp)) {
:+				nfs_softterm(rep);
:+				continue;
:+			}
: 		}

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107231648.f6NGmLP17709>