diff --git a/src/WINNT/afsd/cm_daemon.c b/src/WINNT/afsd/cm_daemon.c index 5e47a7f323..0469c8db50 100644 --- a/src/WINNT/afsd/cm_daemon.c +++ b/src/WINNT/afsd/cm_daemon.c @@ -30,7 +30,7 @@ long cm_daemonCheckDownInterval = 180; long cm_daemonCheckUpInterval = 240; long cm_daemonCheckVolInterval = 3600; long cm_daemonCheckCBInterval = 60; -long cm_daemonCheckVolCBInterval = 1800; +long cm_daemonCheckVolCBInterval = 0; long cm_daemonCheckLockInterval = 60; long cm_daemonTokenCheckInterval = 180; long cm_daemonCheckOfflineVolInterval = 600; @@ -347,7 +347,8 @@ void cm_Daemon(long parm) now = osi_Time(); lastVolCheck = now - cm_daemonCheckVolInterval/2 + (rand() % cm_daemonCheckVolInterval); lastCBExpirationCheck = now - cm_daemonCheckCBInterval/2 + (rand() % cm_daemonCheckCBInterval); - lastVolCBRenewalCheck = now - cm_daemonCheckVolCBInterval/2 + (rand() % cm_daemonCheckVolCBInterval); + if (cm_daemonCheckVolCBInterval) + lastVolCBRenewalCheck = now - cm_daemonCheckVolCBInterval/2 + (rand() % cm_daemonCheckVolCBInterval); lastLockCheck = now - cm_daemonCheckLockInterval/2 + (rand() % cm_daemonCheckLockInterval); lastDownServerCheck = now - cm_daemonCheckDownInterval/2 + (rand() % cm_daemonCheckDownInterval); lastUpServerCheck = now - cm_daemonCheckUpInterval/2 + (rand() % cm_daemonCheckUpInterval); @@ -406,7 +407,8 @@ void cm_Daemon(long parm) now = osi_Time(); } - if (now > lastVolCBRenewalCheck + cm_daemonCheckVolCBInterval) { + if (cm_daemonCheckVolCBInterval && + now > lastVolCBRenewalCheck + cm_daemonCheckVolCBInterval) { lastVolCBRenewalCheck = now; cm_VolumeRenewROCallbacks(); now = osi_Time(); diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index e2d9d62ba7..326b6ef7d3 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -1496,16 +1496,18 @@ enum volstatus cm_GetVolumeStatus(cm_volume_t *volp, afs_uint32 volID) } } - +/* Renew .readonly volume callbacks that are more than + * 30 minutes old. (A volume callback is issued for 2 hours.) + */ void cm_VolumeRenewROCallbacks(void) { cm_volume_t * volp; - + time_t minexp = time(NULL) + 90 * 60; lock_ObtainRead(&cm_volumeLock); for (volp = cm_data.allVolumesp; volp; volp=volp->allNextp) { - if ( volp->cbExpiresRO > 0) { + if ( volp->cbExpiresRO > 0 && volp->cbExpiresRO < minexp) { cm_req_t req; cm_fid_t fid; cm_scache_t * scp;