- Implement a fast->slow leaf conversion (this assert was hit by OO.o setup)

svn path=/trunk/; revision=29114
This commit is contained in:
Aleksey Bragin 2007-09-20 10:36:36 +00:00
parent 87638956af
commit 81ef13c4a1

View file

@ -1125,10 +1125,11 @@ CmpAddSubKey(IN PHHIVE Hive,
{ {
PCM_KEY_NODE KeyNode; PCM_KEY_NODE KeyNode;
PCM_KEY_INDEX Index; PCM_KEY_INDEX Index;
PCM_KEY_FAST_INDEX OldIndex;
UNICODE_STRING Name; UNICODE_STRING Name;
HCELL_INDEX IndexCell = HCELL_NIL, CellToRelease = HCELL_NIL, LeafCell; HCELL_INDEX IndexCell = HCELL_NIL, CellToRelease = HCELL_NIL, LeafCell;
PHCELL_INDEX RootPointer = NULL; PHCELL_INDEX RootPointer = NULL;
ULONG Type; ULONG Type, i;
BOOLEAN IsCompressed; BOOLEAN IsCompressed;
PAGED_CODE(); PAGED_CODE();
@ -1245,9 +1246,21 @@ CmpAddSubKey(IN PHHIVE Hive,
if ((Index->Signature == CM_KEY_FAST_LEAF) && if ((Index->Signature == CM_KEY_FAST_LEAF) &&
(Index->Count >= CmpMaxFastIndexPerHblock)) (Index->Count >= CmpMaxFastIndexPerHblock))
{ {
/* Not handled yet */ DPRINT("Doing Fast->Slow Leaf conversion\n");
DPRINT1("Fast->Slow Leaf Conversion not yet implemented!\n");
ASSERT(FALSE); /* Mark this cell as dirty */
HvMarkCellDirty(Hive, CellToRelease);
/* Convert */
OldIndex = (PCM_KEY_FAST_INDEX)Index;
for (i=0; i < OldIndex->Count; i++)
{
Index->List[i] = OldIndex->List[i].Cell;
}
/* Set the new type value */
Index->Signature = CM_KEY_INDEX_LEAF;
} }
else if (((Index->Signature == CM_KEY_INDEX_LEAF) || else if (((Index->Signature == CM_KEY_INDEX_LEAF) ||
(Index->Signature == CM_KEY_HASH_LEAF)) && (Index->Signature == CM_KEY_HASH_LEAF)) &&