From 7a1c8e57a08dcebce2f3b861a0d7bbabcc5272ba Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 21 Dec 2011 20:49:59 -0500 Subject: [PATCH] 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 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/cm_scache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_scache.c b/src/WINNT/afsd/cm_scache.c index 01a8eb7de0..b981ca4aab 100644 --- a/src/WINNT/afsd/cm_scache.c +++ b/src/WINNT/afsd/cm_scache.c @@ -1833,7 +1833,7 @@ void cm_MergeStatus(cm_scache_t *dscp, * 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; } else if (!(reqp->flags & CM_REQ_SOURCE_REDIR) && scp->dataVersion != dataVersion) { rdr_invalidate = 1;