mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOS:CM] Ignore syncing/flushing requests after registry shutdown
When shutting down the registry of the system we don't want that the registry in question gets poked again, such as flushing the hives or syncing the hives and respective logs for example. The reasoning behind this is very simple, during a complete shutdown the system does final check-ups and stuff until the computer shuts down. Any writing operations done to the registry can lead to erratic behaviors. CmShutdownSystem call already invokes a final flushing of all the hives on the backing storage which is more than enough to ensure consistency of the last session configuration. So after that final flushing, mark HvShutdownComplete as TRUE indicating that any eventual flushing or syncying (in the case where HvSyncHive gets called) request is outright ignored.
This commit is contained in:
parent
99fab7b905
commit
0d776beac9
2 changed files with 10 additions and 1 deletions
|
@ -21,7 +21,6 @@ LIST_ENTRY CmpSelfHealQueueListHead;
|
|||
KEVENT CmpLoadWorkerEvent;
|
||||
LONG CmpLoadWorkerIncrement;
|
||||
PEPROCESS CmpSystemProcess;
|
||||
BOOLEAN HvShutdownComplete;
|
||||
PVOID CmpRegistryLockCallerCaller, CmpRegistryLockCaller;
|
||||
BOOLEAN CmpFlushOnLockRelease;
|
||||
BOOLEAN CmpSpecialBootCondition;
|
||||
|
@ -30,6 +29,7 @@ BOOLEAN CmpWasSetupBoot;
|
|||
BOOLEAN CmpProfileLoaded;
|
||||
BOOLEAN CmpNoVolatileCreates;
|
||||
ULONG CmpTraceLevel = 0;
|
||||
BOOLEAN HvShutdownComplete = FALSE;
|
||||
|
||||
extern LONG CmpFlushStarveWriters;
|
||||
extern BOOLEAN CmFirstTime;
|
||||
|
@ -2049,6 +2049,14 @@ CmShutdownSystem(VOID)
|
|||
ListEntry = ListEntry->Flink;
|
||||
}
|
||||
|
||||
/*
|
||||
* As we flushed all the hives on the disk,
|
||||
* tell the system we do not want any further
|
||||
* registry flushing or syncing at this point
|
||||
* since we are shutting down the registry anyway.
|
||||
*/
|
||||
HvShutdownComplete = TRUE;
|
||||
|
||||
CmpUnlockRegistry();
|
||||
}
|
||||
|
||||
|
|
|
@ -1473,6 +1473,7 @@ extern BOOLEAN CmpProfileLoaded;
|
|||
extern PCMHIVE CmiVolatileHive;
|
||||
extern LIST_ENTRY CmiKeyObjectListHead;
|
||||
extern BOOLEAN CmpHoldLazyFlush;
|
||||
extern BOOLEAN HvShutdownComplete;
|
||||
|
||||
//
|
||||
// Inlined functions
|
||||
|
|
Loading…
Reference in a new issue