From 8e23809542556937a0845246960a0f5484b6cf1e Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 18 Aug 2014 15:25:50 -0400 Subject: [PATCH] Windows: Freelance whole volume rdr invalidate When updating the Freelance directory do not notify the redirector of individual objects to invalidate since that can leaad to race conditions. Send whole volume invalidations since that is what is required in any case. Change-Id: I22a963907ebbb3da3178750670a2897603463cfe Reviewed-on: http://gerrit.openafs.org/11400 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/WINNT/afsd/cm_freelance.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/WINNT/afsd/cm_freelance.c b/src/WINNT/afsd/cm_freelance.c index ea55ea9ea..2d4251f16 100644 --- a/src/WINNT/afsd/cm_freelance.c +++ b/src/WINNT/afsd/cm_freelance.c @@ -405,9 +405,8 @@ int cm_noteLocalMountPointChange(afs_int32 locked) { if (RDR_Initialized) { cm_fid_t fid; cm_FakeRootFid(&fid); - RDR_InvalidateObject( fid.cell, fid.volume, fid.vnode, fid.unique, fid.hash, - CM_SCACHETYPE_DIRECTORY, - AFS_INVALIDATE_DATA_VERSION); + RDR_InvalidateVolume(AFS_FAKE_ROOT_CELL_ID, AFS_FAKE_ROOT_VOL_ID, + AFS_INVALIDATE_DATA_VERSION); } return 1; } @@ -469,11 +468,6 @@ int cm_reInitLocalMountPoints() { lock_ReleaseWrite(&scp->rw); lock_ReleaseWrite(&cm_scacheLock); cm_CallbackNotifyChange(scp); - - if (RDR_Initialized) - RDR_InvalidateObject(scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique, - scp->fid.hash, scp->fileType, AFS_INVALIDATE_CALLBACK); - lock_ObtainWrite(&cm_scacheLock); cm_ReleaseSCacheNoLock(scp); lock_ObtainMutex(&cm_Freelance_Lock); @@ -509,6 +503,10 @@ int cm_reInitLocalMountPoints() { cm_GetCallback(cm_data.rootSCachep, cm_rootUserp, &req, 0); lock_ReleaseWrite(&cm_data.rootSCachep->rw); + if (RDR_Initialized) + RDR_InvalidateVolume(AFS_FAKE_ROOT_CELL_ID, AFS_FAKE_ROOT_VOL_ID, + AFS_INVALIDATE_DATA_VERSION); + osi_Log0(afsd_logp,"----- freelance reinit complete -----"); return 0; } -- 2.39.5