mirror of
https://github.com/reactos/reactos.git
synced 2025-06-07 10:20:26 +00:00
[NTOSKRNL]
In FsRtlAddBaseMcbEntry(): only merge runs if LBNs are consistent. This fixes a few failing tests. CORE-11002 svn path=/trunk/; revision=71137
This commit is contained in:
parent
05838e4ee8
commit
277ab38c90
1 changed files with 4 additions and 2 deletions
|
@ -171,7 +171,8 @@ FsRtlAddBaseMcbEntry(IN PBASE_MCB OpaqueMcb,
|
||||||
NeedleRun.RunEndVbn.QuadPart = NeedleRun.RunStartVbn.QuadPart + 1;
|
NeedleRun.RunEndVbn.QuadPart = NeedleRun.RunStartVbn.QuadPart + 1;
|
||||||
NeedleRun.StartingLbn.QuadPart = ~0ULL;
|
NeedleRun.StartingLbn.QuadPart = ~0ULL;
|
||||||
Mcb->Mapping->Table.CompareRoutine = McbMappingIntersectCompare;
|
Mcb->Mapping->Table.CompareRoutine = McbMappingIntersectCompare;
|
||||||
if ((LowerRun = RtlLookupElementGenericTable(&Mcb->Mapping->Table, &NeedleRun)))
|
if ((LowerRun = RtlLookupElementGenericTable(&Mcb->Mapping->Table, &NeedleRun)) &&
|
||||||
|
(LowerRun->StartingLbn.QuadPart < Node.StartingLbn.QuadPart))
|
||||||
{
|
{
|
||||||
ASSERT(LowerRun->RunEndVbn.QuadPart == Node.RunStartVbn.QuadPart);
|
ASSERT(LowerRun->RunEndVbn.QuadPart == Node.RunStartVbn.QuadPart);
|
||||||
Node.RunStartVbn.QuadPart = LowerRun->RunStartVbn.QuadPart;
|
Node.RunStartVbn.QuadPart = LowerRun->RunStartVbn.QuadPart;
|
||||||
|
@ -185,7 +186,8 @@ FsRtlAddBaseMcbEntry(IN PBASE_MCB OpaqueMcb,
|
||||||
NeedleRun.RunStartVbn.QuadPart = Node.RunEndVbn.QuadPart;
|
NeedleRun.RunStartVbn.QuadPart = Node.RunEndVbn.QuadPart;
|
||||||
NeedleRun.RunEndVbn.QuadPart = NeedleRun.RunStartVbn.QuadPart + 1;
|
NeedleRun.RunEndVbn.QuadPart = NeedleRun.RunStartVbn.QuadPart + 1;
|
||||||
Mcb->Mapping->Table.CompareRoutine = McbMappingIntersectCompare;
|
Mcb->Mapping->Table.CompareRoutine = McbMappingIntersectCompare;
|
||||||
if ((HigherRun = RtlLookupElementGenericTable(&Mcb->Mapping->Table, &NeedleRun)))
|
if ((HigherRun = RtlLookupElementGenericTable(&Mcb->Mapping->Table, &NeedleRun)) &&
|
||||||
|
(Node.StartingLbn.QuadPart <= HigherRun->StartingLbn.QuadPart))
|
||||||
{
|
{
|
||||||
ASSERT(HigherRun->RunStartVbn.QuadPart == Node.RunEndVbn.QuadPart);
|
ASSERT(HigherRun->RunStartVbn.QuadPart == Node.RunEndVbn.QuadPart);
|
||||||
Node.RunEndVbn.QuadPart = HigherRun->RunEndVbn.QuadPart;
|
Node.RunEndVbn.QuadPart = HigherRun->RunEndVbn.QuadPart;
|
||||||
|
|
Loading…
Reference in a new issue