mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOS:CM] Flush the dirty data to disk if the SYSTEM hive has been recovered by FreeLdr
If FreeLdr performed recovery against the SYSTEM hive with a log, all of its data is only present in volatile memory thus dirty. So the kernel is responsible to flush all the data that's been recovered within the SYSTEM hive into the backing storage.
This commit is contained in:
parent
fa80176a62
commit
27917c14ed
1 changed files with 8 additions and 2 deletions
|
@ -1324,8 +1324,14 @@ CmpLoadHiveThread(IN PVOID StartContext)
|
|||
//ASSERT(FALSE);
|
||||
//}
|
||||
|
||||
/* Another thing we don't support is NTLDR-recovery */
|
||||
if (CmHive->Hive.BaseBlock->BootRecover) ASSERT(FALSE);
|
||||
/* FreeLdr has recovered the hive with a log, we must do a flush */
|
||||
if (CmHive->Hive.BaseBlock->BootRecover == HBOOT_BOOT_RECOVERED_BY_HIVE_LOG)
|
||||
{
|
||||
DPRINT1("FreeLdr recovered the hive (hive 0x%p)\n", CmHive);
|
||||
RtlSetAllBits(&CmHive->Hive.DirtyVector);
|
||||
CmHive->Hive.DirtyCount = CmHive->Hive.DirtyVector.SizeOfBitMap;
|
||||
HvSyncHive((PHHIVE)CmHive);
|
||||
}
|
||||
|
||||
/* Finally, set our allocated hive to the same hive we've had */
|
||||
CmpMachineHiveList[i].CmHive2 = CmHive;
|
||||
|
|
Loading…
Reference in a new issue