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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to