]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-freelance-20080411
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 11 Apr 2008 18:46:24 +0000 (18:46 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 11 Apr 2008 18:46:24 +0000 (18:46 +0000)
LICENSE MIT

Do not set the DV on the rootSCachep because doing so disables
the use of MergeStatus().

Do not remove the rootSCachep from the hash table because doing
so makes causes a second cm_scache_t object for that fid to be created
that is not the root.

(cherry picked from commit 7bfe889eb2e900719c70cd9fd29f82569ef4c04c)

src/WINNT/afsd/cm_callback.c
src/WINNT/afsd/cm_freelance.c

index b2aaf7e15a3a7d11f040772a239b43e8bf29d34f..f1489f9080e94a7b482e52cb648e74041c1f2514 100644 (file)
@@ -1466,12 +1466,6 @@ int cm_HaveCallback(cm_scache_t *scp)
 
     if (cm_freelanceEnabled && 
          scp->fid.cell==AFS_FAKE_ROOT_CELL_ID && scp->fid.volume==AFS_FAKE_ROOT_VOL_ID) {
-        /* if it's something on /afs */
-        if (!(scp->fid.vnode==0x1 && scp->fid.unique==0x1)) {
-            /* if it's not root.afs */
-           return 1;
-        }
-
         lock_ObtainMutex(&cm_Freelance_Lock);
         fdc = cm_fakeDirCallback;
         fgc = cm_fakeGettingCallback;
index efcaa57a3081f59c49e2f7809fdaa7e606190991..a83a6e239b76f2f4c8610764faee213d179307c8 100644 (file)
@@ -153,10 +153,6 @@ void cm_InitFreelance() {
 
     lock_InitializeMutex(&cm_Freelance_Lock, "Freelance Lock");
 
-    // make sure we sync the data version to the cached root scache_t                  
-    if (cm_data.rootSCachep && cm_data.rootSCachep->fid.cell == AFS_FAKE_ROOT_CELL_ID) 
-        cm_data.fakeDirVersion = cm_data.rootSCachep->dataVersion;                          
-                                                                                      
     // yj: first we make a call to cm_initLocalMountPoints
     // to read all the local mount points from the registry
     cm_InitLocalMountPoints();
@@ -406,7 +402,7 @@ int cm_reInitLocalMountPoints() {
     for (i=0; i<cm_noLocalMountPoints; i++) {
         hash = CM_SCACHE_HASH(&aFid);
         for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) {
-            if (cm_FidCmp(&scp->fid, &aFid) == 0) {
+            if (scp != cm_data.rootSCachep && cm_FidCmp(&scp->fid, &aFid) == 0) {
                 // mark the scp to be reused
                 cm_HoldSCacheNoLock(scp);
                 lock_ReleaseWrite(&cm_scacheLock);