From f41b56aff54fa38337c2909f5b93ecae503e168e Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 18 Jan 2009 09:45:05 +0000 Subject: [PATCH] Actually enforce the maximum timeout (60s by default) rather than backing off to 256*SRTT. This is why it sometimes could take hours for a NFS mount to come back when the server returned. contributed anonymously. --- sys/nfs/nfs_socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 02bd45c70e1c..a2a0c5b6ca03 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_socket.c,v 1.175 2008/11/23 08:22:07 mrg Exp $ */ +/* $NetBSD: nfs_socket.c,v 1.176 2009/01/18 09:45:05 mrg Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.175 2008/11/23 08:22:07 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.176 2009/01/18 09:45:05 mrg Exp $"); #ifdef _KERNEL_OPT #include "fs_nfs.h" @@ -1673,6 +1673,8 @@ nfs_timer(void *arg) timeo = NFS_RTO(nmp, proct[rep->r_procnum]); if (nmp->nm_timeouts > 0) timeo *= nfs_backoff[nmp->nm_timeouts - 1]; + if (timeo > NFS_MAXTIMEO) + timeo = NFS_MAXTIMEO; if (rep->r_rtt <= timeo) continue; if (nmp->nm_timeouts <