]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-darwin-dnlc-cache-purge-20051223
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Sat, 24 Dec 2005 00:29:11 +0000 (00:29 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 24 Dec 2005 00:29:11 +0000 (00:29 +0000)
FIXES 22644

cache_purge() to hint to darwin that we changed something instead of letting it cache invalid data

(cherry picked from commit 518bebb032c410a520a8923a16263e605370d60c)

src/afs/afs_osidnlc.c

index ab856edad36013ce827d52d2f26d2957ddba98f3..9ece5a1ec1e1415b9c7f27c925d2541659beb4cf 100644 (file)
@@ -367,6 +367,15 @@ osi_dnlc_purgedp(struct vcache *adp)
     int i;
     int writelocked;
 
+#ifdef AFS_DARWIN_ENV
+    if (!(adp->states & (CVInit | CVFlushed
+#ifdef AFS_DARWIN80_ENV
+                        | CDeadVnode
+#endif
+        )) && AFSTOV(adp))
+    cache_purge(AFSTOV(adp));
+#endif
+
     if (!afs_usednlc)
        return 0;
 
@@ -397,6 +406,15 @@ osi_dnlc_purgevp(struct vcache *avc)
     int i;
     int writelocked;
 
+#ifdef AFS_DARWIN_ENV
+    if (!(avc->states & (CVInit | CVFlushed
+#ifdef AFS_DARWIN80_ENV
+                        | CDeadVnode
+#endif
+        )) && AFSTOV(avc))
+    cache_purge(AFSTOV(avc));
+#endif
+
     if (!afs_usednlc)
        return 0;