From 7bfe889eb2e900719c70cd9fd29f82569ef4c04c Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 11 Apr 2008 18:44:47 +0000 Subject: [PATCH] windows-freelance-20080411 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 | 6 ------ src/WINNT/afsd/cm_freelance.c | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/WINNT/afsd/cm_callback.c b/src/WINNT/afsd/cm_callback.c index 871deef..d12bd19 100644 --- a/src/WINNT/afsd/cm_callback.c +++ b/src/WINNT/afsd/cm_callback.c @@ -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; diff --git a/src/WINNT/afsd/cm_freelance.c b/src/WINNT/afsd/cm_freelance.c index 276d2fb..af242f8 100644 --- a/src/WINNT/afsd/cm_freelance.c +++ b/src/WINNT/afsd/cm_freelance.c @@ -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; inextp) { - 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); -- 1.9.4