]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-freelance-20080411
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 11 Apr 2008 18:44:47 +0000 (18:44 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 11 Apr 2008 18:44:47 +0000 (18:44 +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.

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

index 871deeffcfd029538608012f934d546af9fd0c42..d12bd199a3e06ba3f1ba6cec1a284f2e430712a9 100644 (file)
@@ -1462,12 +1462,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 276d2fbaab2063b84a735604e67bfc317a5926f7..af242f8c64579102cc62b140fc39c8b7d553ef43 100644 (file)
@@ -141,10 +141,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();
@@ -392,7 +388,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);