]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
libafs: retry retriable RPCs instead of abandoning
authorDerrick Brashear <shadow@dementix.org>
Wed, 22 Feb 2012 20:57:46 +0000 (15:57 -0500)
committerDerrick Brashear <shadow@dementix.org>
Thu, 23 Feb 2012 18:01:08 +0000 (10:01 -0800)
if we get e.g. an idle dead error we should retry
retriable actions, namely data stores. in order
for writing files to work correctly given how
the writeback code is structured it's important that
this not interfere with analyze's shouldRetry decision
on those RPCs

Reviewed-on: http://gerrit.openafs.org/6749
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 75a3dabe66a9fbc232b05e2f744ad5b867e18262)

Change-Id: I9c611eeb9a71298e9725268392cdf94074324bf1
Reviewed-on: http://gerrit.openafs.org/6777
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/afs/afs_analyze.c
src/afs/afs_stats.h

index b022d95c466c692ccc4a908e328c48fd99183435..1cd7b8a40c3c99abef71cd45ceebb206caec7b7d 100644 (file)
@@ -321,9 +321,12 @@ afs_ClearStatus(struct VenusFid *afid, int op, struct volume *avp)
        } else {
            ReleaseReadLock(&afs_xvcache);
        }
+       if (!avp)
+           afs_PutVolume(tvp, READ_LOCK);
     }
-    if (!avp)
-       afs_PutVolume(tvp, READ_LOCK);
+
+    if (AFS_STATS_FS_RPCIDXES_WRITE_RETRIABLE(op))
+       return 1;
 
     /* not retriable: we may have raced ourselves */
     return 0;
index e02be19520ad52941b744087c59db8ec452ee170..6179d425d5f32411fc726b4379c6a9a4b547af3f 100644 (file)
@@ -868,6 +868,7 @@ struct afs_stats_CMPerf {
 #define AFS_STATS_NUM_FS_RPC_OPS               29
 
 #define AFS_STATS_FS_RPCIDXES_ISWRITE(X)        (((X > AFS_STATS_FS_RPCIDX_FETCHSTATUS) && (X < AFS_STATS_FS_RPCIDX_GETSTATISTICS)) || (X == AFS_STATS_FS_RPCIDX_SETVOLUMESTATUS))
+#define AFS_STATS_FS_RPCIDXES_WRITE_RETRIABLE(X) ((X >= AFS_STATS_FS_RPCIDX_STOREDATA) && (X <= AFS_STATS_FS_RPCIDX_STORESTATUS))
 
 #define AFS_STATS_FS_XFERIDX_FETCHDATA          0
 #define AFS_STATS_FS_XFERIDX_STOREDATA          1