From: Jeffrey Altman Date: Wed, 19 Dec 2012 21:52:34 +0000 (-0500) Subject: Windows: Disable hard dead timeout for RDR File Server connections X-Git-Tag: upstream/1.8.0_pre1^2~1619 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2f8de279e11ff954c0034eb1fd4695cb015d956f;p=packages%2Fo%2Fopenafs.git Windows: Disable hard dead timeout for RDR File Server connections The UNIX cache manager does not implement hard dead timeouts on file server connections. The Windows cache manager had to because of the SMB connection timeout requirements. For the AFS redirector there is no timeout requirement. Therefore, when the SMB stack is disabled the Windows cache manager can disable the hard dead timeout. The idle dead timeouts are in place to cancel connections when file servers stop replying with real data. Change-Id: I44f77b78a52e7cac3a88a53830748b77f3ff4000 Reviewed-on: http://gerrit.openafs.org/8828 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_conn.c b/src/WINNT/afsd/cm_conn.c index c2aa8b216..b1d6f40e5 100644 --- a/src/WINNT/afsd/cm_conn.c +++ b/src/WINNT/afsd/cm_conn.c @@ -355,7 +355,8 @@ cm_Analyze(cm_conn_t *connp, /* timeleft - get it from reqp the same way as cm_ConnByMServers does */ timeUsed = (GetTickCount() - reqp->startTime) / 1000; - if ( reqp->flags & CM_REQ_SOURCE_SMB ) + if ( (reqp->flags & CM_REQ_SOURCE_SMB) || + (serverp && serverp->type == CM_SERVER_VLDB)) timeLeft = HardDeadtimeout - timeUsed; else timeLeft = 0x0FFFFFFF; @@ -1552,7 +1553,8 @@ static void cm_NewRXConnection(cm_conn_t *tcp, cm_ucell_t *ucellp, secObjp, secIndex); rx_SetConnDeadTime(tcp->rxconnp, ConnDeadtimeout); - rx_SetConnHardDeadTime(tcp->rxconnp, HardDeadtimeout); + if (smb_Enabled || tcp->serverp->type == CM_SERVER_VLDB) + rx_SetConnHardDeadTime(tcp->rxconnp, HardDeadtimeout); /* * Setting idle dead timeout to a non-zero value activates RX_CALL_IDLE errors