Author: pschweitzer
Date: Tue Jul 15 06:34:36 2008
New Revision: 34517
URL:
http://svn.reactos.org/svn/reactos?rev=34517&view=rev
Log:
Refactored kernel MCB management:
- Splitted existing functions in two files largemcb.c and mcb.c
- Stubbed (from win2k3) FsRtlInitializeBaseMcb, FsRtlUninitializeBaseMcb,
FsRtlResetBaseMcb, FsRtlTruncateBaseMcb, FsRtlAddBaseMcbEntry, FsRtlRemoveBaseMcbEntry,
FsRtlLookupBaseMcbEntry, FsRtlLookupLastBaseMcbEntry, FsRtlLookupLastBaseMcbEntryAndIndex,
FsRtlGetNextBaseMcbEntry, FsRtlSplitBaseMcb
- Implemented FsRtlNumberOfRunsInBaseMcb
- Added missing definitions to ntifs.h
Added:
branches/pierre-fsd/ntoskrnl/fsrtl/mcb.c (with props)
Modified:
branches/pierre-fsd/include/ddk/ntifs.h
branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c
branches/pierre-fsd/ntoskrnl/ntoskrnl-generic.rbuild
Modified: branches/pierre-fsd/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/branches/pierre-fsd/include/ddk/ntifs.h?…
==============================================================================
--- branches/pierre-fsd/include/ddk/ntifs.h [iso-8859-1] (original)
+++ branches/pierre-fsd/include/ddk/ntifs.h [iso-8859-1] Tue Jul 15 06:34:36 2008
@@ -324,6 +324,8 @@
#define MAP_PROCESS 1L
#define MAP_SYSTEM 2L
#define MEM_DOS_LIM 0x40000000
+
+#define MCB_FLAG_RAISE_ON_ALLOCATION_FAILURE 1
#define OB_TYPE_TYPE 1
#define OB_TYPE_DIRECTORY 2
@@ -3187,6 +3189,303 @@
IN OUT POPLOCK Oplock
);
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlInitializeLargeMcb (
+ IN PLARGE_MCB Mcb,
+ IN POOL_TYPE PoolType
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlUninitializeLargeMcb (
+ IN PLARGE_MCB Mcb
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlResetLargeMcb (
+ IN PLARGE_MCB Mcb,
+ IN BOOLEAN SelfSynchronized
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlTruncateLargeMcb (
+ IN PLARGE_MCB Mcb,
+ IN LONGLONG Vbn
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlAddLargeMcbEntry (
+ IN PLARGE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG Lbn,
+ IN LONGLONG SectorCount
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlRemoveLargeMcbEntry (
+ IN PLARGE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG SectorCount
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlLookupLargeMcbEntry (
+ IN PLARGE_MCB Mcb,
+ IN LONGLONG Vbn,
+ OUT PLONGLONG Lbn OPTIONAL,
+ OUT PLONGLONG SectorCountFromLbn OPTIONAL,
+ OUT PLONGLONG StartingLbn OPTIONAL,
+ OUT PLONGLONG SectorCountFromStartingLbn OPTIONAL,
+ OUT PULONG Index OPTIONAL
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlLookupLastLargeMcbEntry (
+ IN PLARGE_MCB Mcb,
+ OUT PLONGLONG Vbn,
+ OUT PLONGLONG Lbn
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlLookupLastLargeMcbEntryAndIndex (
+ IN PLARGE_MCB OpaqueMcb,
+ OUT PLONGLONG LargeVbn,
+ OUT PLONGLONG LargeLbn,
+ OUT PULONG Index
+);
+
+NTKERNELAPI
+ULONG
+NTAPI
+FsRtlNumberOfRunsInLargeMcb (
+ IN PLARGE_MCB Mcb
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlGetNextLargeMcbEntry (
+ IN PLARGE_MCB Mcb,
+ IN ULONG RunIndex,
+ OUT PLONGLONG Vbn,
+ OUT PLONGLONG Lbn,
+ OUT PLONGLONG SectorCount
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlSplitLargeMcb (
+ IN PLARGE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG Amount
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlInitializeBaseMcb (
+ IN PBASE_MCB Mcb,
+ IN POOL_TYPE PoolType
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlUninitializeBaseMcb (
+ IN PBASE_MCB Mcb
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlResetBaseMcb (
+ IN PBASE_MCB Mcb
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlTruncateBaseMcb (
+ IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlAddBaseMcbEntry (
+ IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG Lbn,
+ IN LONGLONG SectorCount
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlRemoveBaseMcbEntry (
+ IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG SectorCount
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlLookupBaseMcbEntry (
+ IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn,
+ OUT PLONGLONG Lbn OPTIONAL,
+ OUT PLONGLONG SectorCountFromLbn OPTIONAL,
+ OUT PLONGLONG StartingLbn OPTIONAL,
+ OUT PLONGLONG SectorCountFromStartingLbn OPTIONAL,
+ OUT PULONG Index OPTIONAL
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlLookupLastBaseMcbEntry (
+ IN PBASE_MCB Mcb,
+ OUT PLONGLONG Vbn,
+ OUT PLONGLONG Lbn
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlLookupLastBaseMcbEntryAndIndex (
+ IN PBASE_MCB OpaqueMcb,
+ IN OUT PLONGLONG LargeVbn,
+ IN OUT PLONGLONG LargeLbn,
+ IN OUT PULONG Index
+);
+
+NTKERNELAPI
+ULONG
+NTAPI
+FsRtlNumberOfRunsInBaseMcb (
+ IN PBASE_MCB Mcb
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlGetNextBaseMcbEntry (
+ IN PBASE_MCB Mcb,
+ IN ULONG RunIndex,
+ OUT PLONGLONG Vbn,
+ OUT PLONGLONG Lbn,
+ OUT PLONGLONG SectorCount
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlSplitBaseMcb (
+ IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG Amount
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlInitializeMcb (
+ IN PMCB Mcb,
+ IN POOL_TYPE PoolType
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlUninitializeMcb (
+ IN PMCB Mcb
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlTruncateMcb (
+ IN PMCB Mcb,
+ IN VBN Vbn
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlAddMcbEntry (
+ IN PMCB Mcb,
+ IN VBN Vbn,
+ IN LBN Lbn,
+ IN ULONG SectorCount
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+FsRtlRemoveMcbEntry (
+ IN PMCB Mcb,
+ IN VBN Vbn,
+ IN ULONG SectorCount
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlLookupMcbEntry (
+ IN PMCB Mcb,
+ IN VBN Vbn,
+ OUT PLBN Lbn,
+ OUT PULONG SectorCount OPTIONAL,
+ OUT PULONG Index
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlLookupLastMcbEntry (
+ IN PMCB Mcb,
+ OUT PVBN Vbn,
+ OUT PLBN Lbn
+);
+
+NTKERNELAPI
+ULONG
+NTAPI
+FsRtlNumberOfRunsInMcb (
+ IN PMCB Mcb
+);
+
+NTKERNELAPI
+BOOLEAN
+NTAPI
+FsRtlGetNextMcbEntry (
+ IN PMCB Mcb,
+ IN ULONG RunIndex,
+ OUT PVBN Vbn,
+ OUT PLBN Lbn,
+ OUT PULONG SectorCount
+);
+
NTHALAPI
VOID
NTAPI
Modified: branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c
URL:
http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/large…
==============================================================================
--- branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c [iso-8859-1] (original)
+++ branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c [iso-8859-1] Tue Jul 15 06:34:36 2008
@@ -2,8 +2,9 @@
* PROJECT: ReactOS Kernel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/fsrtl/largemcb.c
- * PURPOSE: Mapping Control Block (MCB) support for File System Drivers
+ * PURPOSE: Large Mapped Control Block (MCB) support for File System Drivers
* PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
+ * Pierre Schweitzer (heis_spiter(a)hotmail.com)
*/
/* INCLUDES ******************************************************************/
@@ -13,6 +14,20 @@
#include <debug.h>
/* PUBLIC FUNCTIONS **********************************************************/
+
+/*
+ * @unimplemented
+ */
+BOOLEAN
+NTAPI
+FsRtlAddBaseMcbEntry(IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG Lbn,
+ IN LONGLONG SectorCount)
+{
+ KEBUGCHECK(0);
+ return FALSE;
+}
/*
* @unimplemented
@@ -29,21 +44,21 @@
}
/*
- * @implemented
- */
-BOOLEAN
-NTAPI
-FsRtlAddMcbEntry(IN PMCB Mcb,
- IN VBN Vbn,
- IN LBN Lbn,
- IN ULONG SectorCount)
-{
- /* Call the newer function */
- return FsRtlAddLargeMcbEntry(&Mcb->
- DummyFieldThatSizesThisStructureCorrectly,
- (LONGLONG)Vbn,
- (LONGLONG)Lbn,
- (LONGLONG)SectorCount);
+ * @unimplemented
+ */
+BOOLEAN
+NTAPI
+FsRtlGetNextBaseMcbEntry(IN PBASE_MCB Mcb,
+ IN ULONG RunIndex,
+ OUT PLONGLONG Vbn,
+ OUT PLONGLONG Lbn,
+ OUT PLONGLONG SectorCount)
+{
+ KEBUGCHECK(0);
+ *Vbn = 0;
+ *Lbn = 0;
+ *SectorCount= 0;
+ return FALSE;
}
/*
@@ -65,36 +80,14 @@
}
/*
- * @implemented
- */
-BOOLEAN
-NTAPI
-FsRtlGetNextMcbEntry(IN PMCB Mcb,
- IN ULONG RunIndex,
- OUT PVBN Vbn,
- OUT PLBN Lbn,
- OUT PULONG SectorCount)
-{
- BOOLEAN Return = FALSE;
- LONGLONG llVbn;
- LONGLONG llLbn;
- LONGLONG llSectorCount;
-
- /* Call the Large version */
- Return = FsRtlGetNextLargeMcbEntry(
- &Mcb->DummyFieldThatSizesThisStructureCorrectly,
- RunIndex,
- &llVbn,
- &llLbn,
- &llSectorCount);
-
- /* Return the lower 32 bits */
- *Vbn = (ULONG)llVbn;
- *Lbn = (ULONG)llLbn;
- *SectorCount = (ULONG)llSectorCount;
-
- /* And return the original value */
- return Return;
+ * @unimplemented
+ */
+VOID
+NTAPI
+FsRtlInitializeBaseMcb(IN PBASE_MCB Mcb,
+ IN POOL_TYPE PoolType)
+{
+ KEBUGCHECK(0);
}
/*
@@ -109,16 +102,22 @@
}
/*
- * @implemented
- */
-VOID
-NTAPI
-FsRtlInitializeMcb(IN PMCB Mcb,
- IN POOL_TYPE PoolType)
-{
- /* Call the newer function */
- FsRtlInitializeLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
- PoolType);
+ * @unimplemented
+ */
+BOOLEAN
+NTAPI
+FsRtlLookupBaseMcbEntry(IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn,
+ OUT PLONGLONG Lbn OPTIONAL,
+ OUT PLONGLONG SectorCountFromLbn OPTIONAL,
+ OUT PLONGLONG StartingLbn OPTIONAL,
+ OUT PLONGLONG SectorCountFromStartingLbn OPTIONAL,
+ OUT PULONG Index OPTIONAL)
+{
+ KEBUGCHECK(0);
+ *Lbn = 0;
+ *SectorCountFromLbn = 0;
+ return FALSE;
}
/*
@@ -145,6 +144,23 @@
*/
BOOLEAN
NTAPI
+FsRtlLookupLastBaseMcbEntryAndIndex(IN PBASE_MCB OpaqueMcb,
+ IN OUT PLONGLONG LargeVbn,
+ IN OUT PLONGLONG LargeLbn,
+ IN OUT PULONG Index)
+{
+ KEBUGCHECK(0);
+ *LargeVbn = 0;
+ *LargeLbn = 0;
+ *Index = 0;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOLEAN
+NTAPI
FsRtlLookupLastLargeMcbEntryAndIndex(IN PLARGE_MCB OpaqueMcb,
OUT PLONGLONG LargeVbn,
OUT PLONGLONG LargeLbn,
@@ -162,72 +178,36 @@
*/
BOOLEAN
NTAPI
+FsRtlLookupLastBaseMcbEntry(IN PBASE_MCB Mcb,
+ OUT PLONGLONG Vbn,
+ OUT PLONGLONG Lbn)
+{
+ KEBUGCHECK(0);
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOLEAN
+NTAPI
FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb,
OUT PLONGLONG Vbn,
OUT PLONGLONG Lbn)
{
KEBUGCHECK(0);
- return(FALSE);
+ return FALSE;
}
/*
* @implemented
*/
-BOOLEAN
-NTAPI
-FsRtlLookupLastMcbEntry(IN PMCB Mcb,
- OUT PVBN Vbn,
- OUT PLBN Lbn)
-{
- BOOLEAN Return = FALSE;
- LONGLONG llVbn = 0;
- LONGLONG llLbn = 0;
-
- /* Call the Large version */
- Return = FsRtlLookupLastLargeMcbEntry(
- &Mcb->DummyFieldThatSizesThisStructureCorrectly,
- &llVbn,
- &llLbn);
-
- /* Return the lower 32-bits */
- *Vbn = (ULONG)llVbn;
- *Lbn = (ULONG)llLbn;
-
- /* And return the original value */
- return Return;
-}
-
-/*
- * @implemented
- */
-BOOLEAN
-NTAPI
-FsRtlLookupMcbEntry(IN PMCB Mcb,
- IN VBN Vbn,
- OUT PLBN Lbn,
- OUT PULONG SectorCount OPTIONAL,
- OUT PULONG Index)
-{
- BOOLEAN Return = FALSE;
- LONGLONG llLbn;
- LONGLONG llSectorCount;
-
- /* Call the Large version */
- Return = FsRtlLookupLargeMcbEntry(&Mcb->
- DummyFieldThatSizesThisStructureCorrectly,
- (LONGLONG)Vbn,
- &llLbn,
- &llSectorCount,
- NULL,
- NULL,
- Index);
-
- /* Return the lower 32-bits */
- *Lbn = (ULONG)llLbn;
- if (SectorCount) *SectorCount = (ULONG)llSectorCount;
-
- /* And return the original value */
- return Return;
+ULONG
+NTAPI
+FsRtlNumberOfRunsInBaseMcb(IN PBASE_MCB Mcb)
+{
+ /* Return the count */
+ return Mcb->PairCount;
}
/*
@@ -249,15 +229,16 @@
}
/*
- * @implemented
- */
-ULONG
-NTAPI
-FsRtlNumberOfRunsInMcb (IN PMCB Mcb)
-{
- /* Call the newer function */
- return FsRtlNumberOfRunsInLargeMcb(
- &Mcb->DummyFieldThatSizesThisStructureCorrectly);
+ * @unimplemented
+ */
+BOOLEAN
+NTAPI
+FsRtlRemoveBaseMcbEntry(IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG SectorCount)
+{
+ KEBUGCHECK(0);
+ return FALSE;
}
/*
@@ -273,18 +254,13 @@
}
/*
- * @implemented
- */
-VOID
-NTAPI
-FsRtlRemoveMcbEntry(IN PMCB Mcb,
- IN VBN Vbn,
- IN ULONG SectorCount)
-{
- /* Call the large function */
- FsRtlRemoveLargeMcbEntry(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
- (LONGLONG)Vbn,
- (LONGLONG)SectorCount);
+ * @unimplemented
+ */
+VOID
+NTAPI
+FsRtlResetBaseMcb(IN PBASE_MCB Mcb)
+{
+ KEBUGCHECK(0);
}
/*
@@ -296,6 +272,19 @@
IN BOOLEAN SelfSynchronized)
{
KEBUGCHECK(0);
+}
+
+/*
+ * @unimplemented
+ */
+BOOLEAN
+NTAPI
+FsRtlSplitBaseMcb(IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn,
+ IN LONGLONG Amount)
+{
+ KEBUGCHECK(0);
+ return FALSE;
}
/*
@@ -316,6 +305,17 @@
*/
VOID
NTAPI
+FsRtlTruncateBaseMcb(IN PBASE_MCB Mcb,
+ IN LONGLONG Vbn)
+{
+ KEBUGCHECK(0);
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+NTAPI
FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb,
IN LONGLONG Vbn)
{
@@ -323,16 +323,13 @@
}
/*
- * @implemented
- */
-VOID
-NTAPI
-FsRtlTruncateMcb (IN PMCB Mcb,
- IN VBN Vbn)
-{
- /* Call the newer function */
- FsRtlTruncateLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
- (LONGLONG)Vbn);
+ * @unimplemented
+ */
+VOID
+NTAPI
+FsRtlUninitializeBaseMcb(IN PBASE_MCB Mcb)
+{
+ KEBUGCHECK(0);
}
/*
@@ -345,14 +342,3 @@
KEBUGCHECK(0);
}
-/*
- * @implemented
- */
-VOID
-NTAPI
-FsRtlUninitializeMcb(IN PMCB Mcb)
-{
- /* Call the newer function */
- FsRtlUninitializeLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly);
-}
-
Added: branches/pierre-fsd/ntoskrnl/fsrtl/mcb.c
URL:
http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/mcb.c…
==============================================================================
--- branches/pierre-fsd/ntoskrnl/fsrtl/mcb.c (added)
+++ branches/pierre-fsd/ntoskrnl/fsrtl/mcb.c [iso-8859-1] Tue Jul 15 06:34:36 2008
@@ -1,0 +1,190 @@
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/fsrtl/mcb.c
+ * PURPOSE: Mapped Control Block (MCB) support for File System Drivers
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* PUBLIC FUNCTIONS **********************************************************/
+
+/*
+ * @implemented
+ */
+BOOLEAN
+NTAPI
+FsRtlAddMcbEntry(IN PMCB Mcb,
+ IN VBN Vbn,
+ IN LBN Lbn,
+ IN ULONG SectorCount)
+{
+ /* Call the newer function */
+ return FsRtlAddLargeMcbEntry(&Mcb->
+ DummyFieldThatSizesThisStructureCorrectly,
+ (LONGLONG)Vbn,
+ (LONGLONG)Lbn,
+ (LONGLONG)SectorCount);
+}
+
+/*
+ * @implemented
+ */
+BOOLEAN
+NTAPI
+FsRtlGetNextMcbEntry(IN PMCB Mcb,
+ IN ULONG RunIndex,
+ OUT PVBN Vbn,
+ OUT PLBN Lbn,
+ OUT PULONG SectorCount)
+{
+ BOOLEAN Return = FALSE;
+ LONGLONG llVbn;
+ LONGLONG llLbn;
+ LONGLONG llSectorCount;
+
+ /* Call the Large version */
+ Return = FsRtlGetNextLargeMcbEntry(
+ &Mcb->DummyFieldThatSizesThisStructureCorrectly,
+ RunIndex,
+ &llVbn,
+ &llLbn,
+ &llSectorCount);
+
+ /* Return the lower 32 bits */
+ *Vbn = (ULONG)llVbn;
+ *Lbn = (ULONG)llLbn;
+ *SectorCount = (ULONG)llSectorCount;
+
+ /* And return the original value */
+ return Return;
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+FsRtlInitializeMcb(IN PMCB Mcb,
+ IN POOL_TYPE PoolType)
+{
+ /* Call the newer function */
+ FsRtlInitializeLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
+ PoolType);
+}
+
+/*
+ * @implemented
+ */
+BOOLEAN
+NTAPI
+FsRtlLookupLastMcbEntry(IN PMCB Mcb,
+ OUT PVBN Vbn,
+ OUT PLBN Lbn)
+{
+ BOOLEAN Return = FALSE;
+ LONGLONG llVbn = 0;
+ LONGLONG llLbn = 0;
+
+ /* Call the Large version */
+ Return = FsRtlLookupLastLargeMcbEntry(
+ &Mcb->DummyFieldThatSizesThisStructureCorrectly,
+ &llVbn,
+ &llLbn);
+
+ /* Return the lower 32-bits */
+ *Vbn = (ULONG)llVbn;
+ *Lbn = (ULONG)llLbn;
+
+ /* And return the original value */
+ return Return;
+}
+
+/*
+ * @implemented
+ */
+BOOLEAN
+NTAPI
+FsRtlLookupMcbEntry(IN PMCB Mcb,
+ IN VBN Vbn,
+ OUT PLBN Lbn,
+ OUT PULONG SectorCount OPTIONAL,
+ OUT PULONG Index)
+{
+ BOOLEAN Return = FALSE;
+ LONGLONG llLbn;
+ LONGLONG llSectorCount;
+
+ /* Call the Large version */
+ Return = FsRtlLookupLargeMcbEntry(&Mcb->
+ DummyFieldThatSizesThisStructureCorrectly,
+ (LONGLONG)Vbn,
+ &llLbn,
+ &llSectorCount,
+ NULL,
+ NULL,
+ Index);
+
+ /* Return the lower 32-bits */
+ *Lbn = (ULONG)llLbn;
+ if (SectorCount) *SectorCount = (ULONG)llSectorCount;
+
+ /* And return the original value */
+ return Return;
+}
+
+/*
+ * @implemented
+ */
+ULONG
+NTAPI
+FsRtlNumberOfRunsInMcb(IN PMCB Mcb)
+{
+ /* Call the newer function */
+ return FsRtlNumberOfRunsInLargeMcb(
+ &Mcb->DummyFieldThatSizesThisStructureCorrectly);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+FsRtlRemoveMcbEntry(IN PMCB Mcb,
+ IN VBN Vbn,
+ IN ULONG SectorCount)
+{
+ /* Call the large function */
+ FsRtlRemoveLargeMcbEntry(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
+ (LONGLONG)Vbn,
+ (LONGLONG)SectorCount);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+FsRtlTruncateMcb(IN PMCB Mcb,
+ IN VBN Vbn)
+{
+ /* Call the newer function */
+ FsRtlTruncateLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
+ (LONGLONG)Vbn);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+FsRtlUninitializeMcb(IN PMCB Mcb)
+{
+ /* Call the newer function */
+ FsRtlUninitializeLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly);
+}
Propchange: branches/pierre-fsd/ntoskrnl/fsrtl/mcb.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/pierre-fsd/ntoskrnl/ntoskrnl-generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/ntoskrnl-ge…
==============================================================================
--- branches/pierre-fsd/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original)
+++ branches/pierre-fsd/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Tue Jul 15 06:34:36
2008
@@ -218,6 +218,7 @@
<file>fsfilter.c</file>
<file>fsrtlpc.c</file>
<file>largemcb.c</file>
+ <file>mcb.c</file>
<file>name.c</file>
<file>notify.c</file>
<file>oplock.c</file>