=item B<-sleep> <I<sleep_time>/I<run_time>>
-This option only applies to the LWP version of the volserver, and has no effect
-on the pthreaded version of the volserver. Note that OpenAFS no longer ships an
-LWP version of the volserver; the last version series where the LWP volserver
-was even built was the 1.6.x series of OpenAFS.
-
-For the LWP version of the volserver, specifying this option forces the
-volserver to sleep during certain volume operations, so the volserver does not
-become I/O bound. Approximately every I<run_time> seconds, the volserver is
-forced to sleep for I<sleep_time> seconds if any volume transactions are active
-that are performing certain operations. This includes operations involving
-deleting, cloning, moving, releasing, copying, or restoring a volume.
+This option is obsolete, and is now only accepted for compatibility with older
+releases. All it does now is log a warning message about how the option is
+obsolete.
=item B<-help>
return NULL;
}
-/* Background daemon for sleeping so the volserver does not become I/O bound */
-afs_int32 TTsleep, TTrun;
-#ifndef AFS_PTHREAD_ENV
-static void *
-BKGSleep(void *unused)
-{
- struct volser_trans *tt;
-
- if (TTsleep) {
- while (1) {
-#ifdef AFS_PTHREAD_ENV
- sleep(TTrun);
-#else /* AFS_PTHREAD_ENV */
- IOMGR_Sleep(TTrun);
-#endif
- VTRANS_LOCK;
- for (tt = TransList(); tt; tt = tt->next) {
- VTRANS_OBJ_LOCK(tt);
- if ((strcmp(tt->lastProcName, "DeleteVolume") == 0)
- || (strcmp(tt->lastProcName, "Clone") == 0)
- || (strcmp(tt->lastProcName, "ReClone") == 0)
- || (strcmp(tt->lastProcName, "Forward") == 0)
- || (strcmp(tt->lastProcName, "Restore") == 0)
- || (strcmp(tt->lastProcName, "ForwardMulti") == 0)) {
- VTRANS_OBJ_UNLOCK(tt);
- break;
- }
- VTRANS_OBJ_UNLOCK(tt);
- }
- if (tt) {
- VTRANS_UNLOCK;
- sleep(TTsleep);
- } else
- VTRANS_UNLOCK;
- }
- }
- return NULL;
-}
-#endif
-
#ifdef AFS_NT40_ENV
/* no volser_syscall */
#elif defined(AFS_SUN511_ENV)
}
}
if (cmd_OptionAsString(opts, OPT_sleep, &sleepSpec) == 0) {
- sscanf(sleepSpec, "%d/%d", &TTsleep, &TTrun);
- if ((TTsleep < 0) || (TTrun <= 0)) {
- printf("Warning: '-sleep %d/%d' is incorrect; ignoring\n",
- TTsleep, TTrun);
- TTsleep = TTrun = 0;
- }
-
+ printf("Warning: -sleep option ignored; this option is obsolete\n");
}
if (cmd_OptionAsString(opts, OPT_sync, &sync_behavior) == 0) {
if (ih_SetSyncBehavior(sync_behavior)) {
exit(2);
}
- TTsleep = TTrun = 0;
-
configDir = strdup(AFSDIR_SERVER_ETC_DIRPATH);
logFile = strdup(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
#else
PROCESS pid;
LWP_CreateProcess(BKGLoop, 16*1024, 3, 0, "vol bkg daemon", &pid);
- LWP_CreateProcess(BKGSleep,16*1024, 3, 0, "vol slp daemon", &pid);
#endif
}
if (afsconf_GetLatestKey(tdir, NULL, NULL) == 0) {
LogDesWarning();
}
- if (TTsleep) {
- Log("Will sleep %d second%s every %d second%s\n", TTsleep,
- (TTsleep > 1) ? "s" : "", TTrun + TTsleep,
- (TTrun + TTsleep > 1) ? "s" : "");
- }
/* allow super users to manage RX statistics */
rx_SetRxStatUserOk(vol_rxstat_userok);