From: Derrick Brashear Date: Mon, 6 Dec 2010 18:55:22 +0000 (-0500) Subject: properly mark servers down for rx errors except OPCODE X-Git-Tag: openafs-stable-1_6_0pre1~23 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a463e658969e112260a631f910b4d431c76835a4;p=packages%2Fo%2Fopenafs.git properly mark servers down for rx errors except OPCODE if we get a negative (rx) error, it means the server is down, *except* for RXGEN_OPCODE. make this handling consistent (cherry picked from commit be770d4336c2fd7b8a83f18577ae6bb23a3f3e99) Change-Id: I97f161e19140591c304e748eead8dcc46852f94a Reviewed-on: http://gerrit.openafs.org/3456 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/afs_server.c b/src/afs/afs_server.c index 3e461e1f6..20859e9f2 100644 --- a/src/afs/afs_server.c +++ b/src/afs/afs_server.c @@ -725,11 +725,11 @@ afs_CheckServers(int adown, struct cell *acellp) afs_osi_Wakeup(&afs_waitForever); } } else { - if (results[i] < 0) { - /* server crashed */ - afs_ServerDown(sa); - ForceNewConnections(sa); /* multi homed clients */ - } + if ((results[i] < 0) && (results[i] != RXGEN_OPCODE)) { + /* server crashed */ + afs_ServerDown(sa); + ForceNewConnections(sa); /* multi homed clients */ + } } } @@ -1714,7 +1714,13 @@ afs_GetCapabilities(struct server *ts) ReleaseWriteLock(&afs_xserver); code = RXAFS_GetCapabilities(tc->id, &caps); ObtainWriteLock(&afs_xserver, 723); - afs_PutConn(tc, SHARED_LOCK); + /* we forced a conn above; important we mark it down if needed */ + if ((code < 0) && (code != RXGEN_OPCODE)) { + afs_PutConn(tc, SHARED_LOCK); + afs_ServerDown(tc->parent->srvr); + ForceNewConnections(tc->parent->srvr); /* multi homed clients */ + } + if ( code && code != RXGEN_OPCODE ) { afs_warn("RXAFS_GetCapabilities failed with code %d\n", code); /* better not be anything to free. we failed! */