From owner-freebsd-current Mon Jul 23 9:48:40 2001 Delivered-To: freebsd-current@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 49D5D37B403; Mon, 23 Jul 2001 09:48:33 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.4/8.11.2) id f6NGmLP17709; Mon, 23 Jul 2001 09:48:21 -0700 (PDT) (envelope-from dillon) Date: Mon, 23 Jul 2001 09:48:21 -0700 (PDT) From: Matt Dillon Message-Id: <200107231648.f6NGmLP17709@earth.backplane.com> To: Ian Dowse Cc: Maxim Sobolev , current@FreeBSD.ORG Subject: Re: NFS client unable to recover from server crash References: <200107231712.aa22684@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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