/**************************************************************************** NAME configManagerDefragCheck DESCRIPTION Defrag PS if required. RETURNS void */ void configManagerDefragCheck(void) { CONF_DEBUG(("CONF: Defrag Check ")) ; if(theSink.rundata->defrag.key_size) { uint16 count = PsFreeCount(theSink.rundata->defrag.key_size); CONF_DEBUG(("Enabled [%d] ", count)) ; if(count <= theSink.rundata->defrag.key_minimum) { CONF_DEBUG(("Flooding PS")) ; PsFlood(); /* try to set the same boot mode; this triggers the target to reboot.*/ BootSetMode(BootGetMode()); } } CONF_DEBUG(("\n")) ; }
/* NAME PsFloodAndReboot DESCRIPTION Process the required actions from HandleRebootToResume. Flood PS to force a defrag on next boot, then do a warm reboot. Called either immediately or once we receive permission from the VM application. */ static void PsFloodAndReboot() { PsFlood(); BootSetMode(BootGetMode()); }