exit(CLD_EXITED, 0);
# endif /* AFS_SGI_ENV */
}
-# if defined(AFS_SUN5_ENV) || defined(RXK_LISTENER_ENV)
+# if defined(AFS_SUN5_ENV) || defined(RXK_LISTENER_ENV) || defined(RXK_UPCALL_ENV)
else if (parm == AFSOP_RXEVENT_DAEMON) {
while (afs_initState < AFSOP_START_BKG)
afs_osi_Sleep(&afs_initState);
exit(CLD_EXITED, 0);
# endif /* AFS_SGI_ENV */
}
-# endif /* AFS_SUN5_ENV || RXK_LISTENER_ENV */
+# endif /* AFS_SUN5_ENV || RXK_LISTENER_ENV || RXK_UPCALL_ENV */
#endif /* AFS_DAEMONOP_ENV */
else if (parm == AFSOP_BASIC_INIT) {
afs_int32 temp;
if (refresh) {
afs_CheckServers(1, NULL); /* check down servers */
- afs_CheckServers(0, NULL); /* check down servers */
+ afs_CheckServers(0, NULL); /* check up servers */
}
}
#ifdef AFS_SGI53_ENV
if (afs_shuttingdown)
return;
- afs_FlushVCBs(2); /* Reasonable effort to free dynamically allocated callback returns */
+
+ /* Give up all of our callbacks if we can. This must be done before setting
+ * afs_shuttingdown, since it calls afs_InitReq, which will fail if
+ * afs_shuttingdown is set. */
+ afs_FlushVCBs(2);
afs_shuttingdown = 1;
+
if (afs_cold_shutdown)
afs_warn("afs: COLD ");
else
afs_warn("afs: WARM ");
- afs_warn("shutting down of: CB... ");
+ afs_warn("shutting down of: vcaches... ");
+
+#if !defined(AFS_FBSD_ENV)
+ /* The FBSD afs_unmount() calls vflush(), which reclaims all vnodes
+ * on the mountpoint, flushing them in the process. In the presence
+ * of bugs, flushing again here can cause panics. */
+ afs_FlushAllVCaches();
+#endif
+
+ afs_warn("CB... ");
afs_termState = AFSOP_STOP_RXCALLBACK;
rx_WakeupServerProcs();