]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
idledead client dont interrupt writes
authorDerrick Brashear <shadow@dementia.org>
Sun, 21 Feb 2010 22:15:26 +0000 (17:15 -0500)
committerDerrick Brashear <shadow@dementia.org>
Mon, 22 Feb 2010 17:16:54 +0000 (09:16 -0800)
allowing failover is nonsensical, there's nothing to fail to. keep trying to
write. if we want to change this, we need to handle it better than just this.

Change-Id: Ibed4c63182f44ed9e659895e4868b4192d004688
Reviewed-on: http://gerrit.openafs.org/1355
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 01f42cad663cc860e451f694f973ca46f03289ff)
Reviewed-on: http://gerrit.openafs.org/1359

src/afs/afs_analyze.c

index 3d70f83dcfe5ae60eff9eba062983a6a7396f37e..861b7e522fa494a2b7bb1ccf51a3b8f010902135 100644 (file)
@@ -672,12 +672,17 @@ afs_Analyze(register struct afs_conn *aconn, afs_int32 acode,
     if ((acode < 0) && (acode != VRESTARTING)) {
        if (acode == RX_CALL_TIMEOUT) {
            serversleft = afs_BlackListOnce(areq, afid, tsp);
-           areq->idleError++;
-           if (serversleft) {
-               shouldRetry = 1;
-           } else {
+           tvp = afs_FindVolume(afid, READ_LOCK);
+           if (!tvp || (tvp->states & VRO))
+               areq->idleError++;
+           if ((serversleft == 0) && tvp &&
+               ((tvp->states & VRO) || (tvp->states & VBackup))) {
                shouldRetry = 0;
+           } else {
+               shouldRetry = 1;
            }
+           if (tvp)
+               afs_PutVolume(tvp, READ_LOCK);
            /* By doing this, we avoid ever marking a server down
             * in an idle timeout case. That's because the server is 
             * still responding and may only be letting a single vnode