]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: Freelance whole volume rdr invalidate
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 18 Aug 2014 19:25:50 +0000 (15:25 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Aug 2014 16:54:56 +0000 (12:54 -0400)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsd/cm_freelance.c

index ea55ea9ea36c1472c5116eeeef490ba1f89e07d6..2d4251f162e87331297ddc4fece0764f2edc98cb 100644 (file)
@@ -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;
 }