KDFS-windows-freelance-20090204

LICENSE MIT

set the correct fid vnode/unique values when adding new symlnks and
mount points.


(cherry picked from commit ffdc7c70889386dca37e207a91791d5d0728d2d7)
This commit is contained in:
Jeffrey Altman 2009-02-05 00:25:03 +00:00
parent 76c5cecf4e
commit 0f4c404cbe

View File

@ -385,11 +385,10 @@ int cm_reInitLocalMountPoints() {
osi_Log0(afsd_logp,"Invalidating local mount point scp... ");
lock_ObtainWrite(&cm_scacheLock);
lock_ObtainMutex(&cm_Freelance_Lock); /* always scache then freelance lock */
for (i=1; i<=cm_noLocalMountPoints; i++) {
cm_SetFid(&aFid, AFS_FAKE_ROOT_CELL_ID, AFS_FAKE_ROOT_VOL_ID, i, 1);
cm_SetFid(&aFid, AFS_FAKE_ROOT_CELL_ID, AFS_FAKE_ROOT_VOL_ID, i*2, i);
hash = CM_SCACHE_HASH(&aFid);
for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) {
if (scp != cm_data.rootSCachep && cm_FidCmp(&scp->fid, &aFid) == 0) {
@ -1073,7 +1072,7 @@ long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw,
/* cm_reInitLocalMountPoints(); */
if (fidp)
cm_SetFid(fidp, fidp->cell, fidp->volume, ++cm_noLocalMountPoints, 1);
cm_SetFid(fidp, fidp->cell, fidp->volume, ++cm_noLocalMountPoints*2, cm_noLocalMountPoints);
cm_noteLocalMountPointChange();
return 0;
}
@ -1280,7 +1279,7 @@ long cm_FreelanceAddSymlink(char *filename, char *destination, cm_fid_t *fidp)
/* cm_reInitLocalMountPoints(); */
if (fidp)
cm_SetFid(fidp, fidp->cell, fidp->volume, ++cm_noLocalMountPoints, 1);
cm_SetFid(fidp, fidp->cell, fidp->volume, ++cm_noLocalMountPoints*2, cm_noLocalMountPoints);
cm_noteLocalMountPointChange();
return 0;
}