Windows: Bad DV invalidate only when new DV not 0

If the current DV is BAD_VERSION and the new DV is 0, do not send
an invalidation to the redirector.  It only results in wasteful work.
If the current DV is BAD_VERSION the object either:

 1. was never previously known

 2. was recently flushed

 3. the cm_scache_t was recycled

In all cases, the redirector does not have knowledge of the object
since either it didn't exist or a previous invalidation was sent.

Change-Id: I7e0cf41bae64660e4e1ec342bafcf3ef8a693d56
Reviewed-on: http://gerrit.openafs.org/6392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2011-12-21 20:49:59 -05:00 committed by Jeffrey Altman
parent f417dba692
commit 7a1c8e57a0

View File

@ -1833,7 +1833,7 @@ void cm_MergeStatus(cm_scache_t *dscp,
* in an unexpected DV change such as FetchStatus. * in an unexpected DV change such as FetchStatus.
*/ */
if (scp->dataVersion == CM_SCACHE_VERSION_BAD) { if (scp->dataVersion == CM_SCACHE_VERSION_BAD && dataVersion != 0) {
rdr_invalidate = 1; rdr_invalidate = 1;
} else if (!(reqp->flags & CM_REQ_SOURCE_REDIR) && scp->dataVersion != dataVersion) { } else if (!(reqp->flags & CM_REQ_SOURCE_REDIR) && scp->dataVersion != dataVersion) {
rdr_invalidate = 1; rdr_invalidate = 1;