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 14:52:40 +0000 (06:52 -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>

src/afs/afs_analyze.c

index e9f0049..443fae3 100644 (file)
@@ -458,12 +458,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