mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
Windows: add locked parameter to cm_noteLocalMountPointChange
If cm_Freelance_Lock is held set the 'locked' parameter to TRUE. This avoids a requirement to drop the lock only to have it be obtained when cm_noteLocalMountPointChange. LICENSE MIT Change-Id: Ic1e8a008639b33769a088c3b24ef7a7e7b09fb12 Reviewed-on: http://gerrit.openafs.org/1887 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
f2b98e27f8
commit
3a48bf73d3
@ -75,7 +75,7 @@ void cm_FreelanceChangeNotifier(void * parmp) {
|
|||||||
hFreelanceChangeEvent = 0;
|
hFreelanceChangeEvent = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cm_noteLocalMountPointChange();
|
cm_noteLocalMountPointChange(FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ void cm_FreelanceSymlinkChangeNotifier(void * parmp) {
|
|||||||
hFreelanceSymlinkChangeEvent = 0;
|
hFreelanceSymlinkChangeEvent = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cm_noteLocalMountPointChange();
|
cm_noteLocalMountPointChange(FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,11 +358,13 @@ int cm_FakeRootFid(cm_fid_t *fidp)
|
|||||||
|
|
||||||
/* called directly from ioctl */
|
/* called directly from ioctl */
|
||||||
/* called while not holding freelance lock */
|
/* called while not holding freelance lock */
|
||||||
int cm_noteLocalMountPointChange(void) {
|
int cm_noteLocalMountPointChange(afs_int32 locked) {
|
||||||
lock_ObtainMutex(&cm_Freelance_Lock);
|
if (!locked)
|
||||||
|
lock_ObtainMutex(&cm_Freelance_Lock);
|
||||||
cm_data.fakeDirVersion++;
|
cm_data.fakeDirVersion++;
|
||||||
cm_localMountPointChangeFlag = 1;
|
cm_localMountPointChangeFlag = 1;
|
||||||
lock_ReleaseMutex(&cm_Freelance_Lock);
|
if (!locked)
|
||||||
|
lock_ReleaseMutex(&cm_Freelance_Lock);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ extern int cm_getLocalMountPointChange();
|
|||||||
extern int cm_reInitLocalMountPoints();
|
extern int cm_reInitLocalMountPoints();
|
||||||
extern void cm_InitFreelance();
|
extern void cm_InitFreelance();
|
||||||
extern void cm_FreelanceShutdown(void);
|
extern void cm_FreelanceShutdown(void);
|
||||||
extern int cm_noteLocalMountPointChange(void);
|
extern int cm_noteLocalMountPointChange(afs_int32 locked);
|
||||||
extern long cm_FreelanceRemoveMount(char *toremove);
|
extern long cm_FreelanceRemoveMount(char *toremove);
|
||||||
extern long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp);
|
extern long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp);
|
||||||
extern long cm_FreelanceRemoveSymlink(char *toremove);
|
extern long cm_FreelanceRemoveSymlink(char *toremove);
|
||||||
|
@ -95,7 +95,7 @@ cm_FlushFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp)
|
|||||||
|
|
||||||
#ifdef AFS_FREELANCE_CLIENT
|
#ifdef AFS_FREELANCE_CLIENT
|
||||||
if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) {
|
if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) {
|
||||||
cm_noteLocalMountPointChange();
|
cm_noteLocalMountPointChange(FALSE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -148,7 +148,7 @@ cm_FlushVolume(cm_user_t *userp, cm_req_t *reqp, afs_uint32 cell, afs_uint32 vol
|
|||||||
|
|
||||||
#ifdef AFS_FREELANCE_CLIENT
|
#ifdef AFS_FREELANCE_CLIENT
|
||||||
if ( cell == AFS_FAKE_ROOT_CELL_ID && volume == AFS_FAKE_ROOT_VOL_ID ) {
|
if ( cell == AFS_FAKE_ROOT_CELL_ID && volume == AFS_FAKE_ROOT_VOL_ID ) {
|
||||||
cm_noteLocalMountPointChange();
|
cm_noteLocalMountPointChange(FALSE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -4075,7 +4075,7 @@ void smb_Daemon(void *parmp)
|
|||||||
|
|
||||||
#ifdef AFS_FREELANCE
|
#ifdef AFS_FREELANCE
|
||||||
if ( smb_localZero != old_localZero )
|
if ( smb_localZero != old_localZero )
|
||||||
cm_noteLocalMountPointChange();
|
cm_noteLocalMountPointChange(FALSE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
smb_CheckVCs();
|
smb_CheckVCs();
|
||||||
@ -10661,7 +10661,7 @@ void smb_Init(osi_log_t *logp, int useV3,
|
|||||||
|
|
||||||
#ifdef AFS_FREELANCE_CLIENT
|
#ifdef AFS_FREELANCE_CLIENT
|
||||||
/* Make sure the root.afs volume has the correct time */
|
/* Make sure the root.afs volume has the correct time */
|
||||||
cm_noteLocalMountPointChange();
|
cm_noteLocalMountPointChange(FALSE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* initialize the remote debugging log */
|
/* initialize the remote debugging log */
|
||||||
|
Loading…
Reference in New Issue
Block a user