libafs: retry retriable RPCs instead of abandoning

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

Change-Id: Ie091a72b924c8414ec66c377fa13da14575a69cf
Reviewed-on: http://gerrit.openafs.org/6749
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Derrick Brashear 2012-02-22 15:57:46 -05:00
parent 2378895fc6
commit 75a3dabe66
2 changed files with 6 additions and 2 deletions

View File

@ -319,9 +319,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;

View File

@ -870,6 +870,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