If a store operation is performed direct to the file server
bypassing the AFSCache, call cm_MergeStatus() with
CM_MERGEFLAG_CACHE_BYPASS to ensure that the valid version
numbers for the cm_scache_t object are incremented appropriately.
After a cache bypass occurs, only buffers with the current
data version number are valid since the cached data will be
incomplete.
Change-Id: I9438f8c9759407de69ab894df4f6fe91027a4b94
Reviewed-on: http://gerrit.openafs.org/8964
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
if (((flags & (CM_MERGEFLAG_STOREDATA|CM_MERGEFLAG_DIROP)) && (dv_diff(dataVersion, scp->dataVersion) > activeRPCs)) ||
(!(flags & (CM_MERGEFLAG_STOREDATA|CM_MERGEFLAG_DIROP)) && (scp->dataVersion != dataVersion)) ||
scp->bufDataVersionLow == CM_SCACHE_VERSION_BAD ||
- scp->fileType == CM_SCACHETYPE_DIRECTORY)
+ scp->fileType == CM_SCACHETYPE_DIRECTORY ||
+ flags & CM_MERGEFLAG_CACHE_BYPASS) {
scp->bufDataVersionLow = dataVersion;
+ }
if (RDR_Initialized) {
/*
#define CM_MERGEFLAG_DIROP 4 /* Merge due to directory op */
#define CM_MERGEFLAG_FETCHDATA 8 /* Merge due to fetchdata op */
#define CM_MERGEFLAG_BULKSTAT 0x10 /* Merge due to bulkstat op */
+#define CM_MERGEFLAG_CACHE_BYPASS 0x20 /* Data not stored into cache */
/* hash define. Must not include the cell, since the callback revocation code
* doesn't necessarily know the cell in the case of a multihomed server