FsRtl:Memory Control Block updates (from ntifs.h by B.Branten)
authorEmanuele Aliberti <ea@iol.it>
Sat, 19 Apr 2003 17:17:10 +0000 (17:17 +0000)
committerEmanuele Aliberti <ea@iol.it>
Sat, 19 Apr 2003 17:17:10 +0000 (17:17 +0000)
svn path=/trunk/; revision=4554

reactos/include/ddk/fsfuncs.h
reactos/include/ddk/fstypes.h
reactos/ntoskrnl/fs/mcb.c

index 51adca6..13038aa 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef __INCLUDE_DDK_FSFUNCS_H
 #define __INCLUDE_DDK_FSFUNCS_H
-/* $Id: fsfuncs.h,v 1.17 2002/11/07 02:44:49 robd Exp $ */
+/* $Id: fsfuncs.h,v 1.18 2003/04/19 17:17:10 ea Exp $ */
 #define FlagOn(x,f) ((x) & (f))
 
 VOID
@@ -24,13 +24,11 @@ FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb,
                      IN LONGLONG Lbn,
                      IN LONGLONG SectorCount);
 
-VOID STDCALL
-FsRtlAddMcbEntry(
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2,
-       DWORD   Unknown3
-       );
+BOOLEAN STDCALL
+FsRtlAddMcbEntry (IN PMCB     Mcb,
+                 IN VBN      Vbn,
+                 IN LBN      Lbn,
+                 IN ULONG    SectorCount);
 
 VOID STDCALL
 FsRtlAddToTunnelCache (
@@ -250,15 +248,12 @@ FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb,
                          OUT PLONGLONG Lbn,
                          OUT PLONGLONG SectorCount);
 
-VOID
-STDCALL
-FsRtlGetNextMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2,
-       DWORD   Unknown3,
-       DWORD   Unknown4
-       );
+BOOLEAN STDCALL
+FsRtlGetNextMcbEntry (IN PMCB     Mcb,
+                     IN ULONG    RunIndex,
+                     OUT PVBN    Vbn,
+                     OUT PLBN    Lbn,
+                     OUT PULONG  SectorCount);
 #define FsRtlEnterFileSystem    KeEnterCriticalRegion
 #define FsRtlExitFileSystem     KeLeaveCriticalRegion
 VOID
@@ -273,12 +268,9 @@ VOID STDCALL
 FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb,
                        IN POOL_TYPE PoolType);
 
-VOID
-STDCALL
-FsRtlInitializeMcb (
-       DWORD   Unknown0,
-       DWORD   Unknown1
-       );
+VOID STDCALL
+FsRtlInitializeMcb (IN PMCB         Mcb,
+                   IN POOL_TYPE    PoolType);
 
 VOID STDCALL
 FsRtlInitializeOplock(IN OUT POPLOCK Oplock);
@@ -347,22 +339,17 @@ FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb,
                             OUT PLONGLONG Vbn,
                             OUT PLONGLONG Lbn);
 
-VOID
-STDCALL
-FsRtlLookupLastMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2
-       );
-VOID
-STDCALL
-FsRtlLookupMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2,
-       DWORD   Unknown3,
-       DWORD   Unknown4
-       );
+BOOLEAN STDCALL
+FsRtlLookupLastMcbEntry (IN PMCB     Mcb,
+                        OUT PVBN    Vbn,
+                        OUT PLBN    Lbn);
+BOOLEAN STDCALL
+FsRtlLookupMcbEntry (IN PMCB     Mcb,
+                    IN VBN      Vbn,
+                    OUT PLBN    Lbn,
+                    OUT PULONG  SectorCount OPTIONAL,
+                    OUT PULONG  Index);
+
 BOOLEAN
 STDCALL
 FsRtlMdlRead (
@@ -522,11 +509,9 @@ FsRtlNormalizeNtstatus(IN NTSTATUS NtStatusToNormalize,
 ULONG STDCALL
 FsRtlNumberOfRunsInLargeMcb(IN PLARGE_MCB Mcb);
 
-VOID
-STDCALL
-FsRtlNumberOfRunsInMcb (
-       DWORD   Unknown0
-       );
+ULONG STDCALL
+FsRtlNumberOfRunsInMcb (IN PMCB Mcb);
+
 VOID
 STDCALL
 FsRtlPostPagingFileStackOverflow (
@@ -575,13 +560,10 @@ FsRtlRemoveLargeMcbEntry(IN PLARGE_MCB Mcb,
                         IN LONGLONG Vbn,
                         IN LONGLONG SectorCount);
 
-VOID
-STDCALL
-FsRtlRemoveMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2
-       );
+VOID STDCALL
+FsRtlRemoveMcbEntry (IN PMCB     Mcb,
+                    IN VBN      Vbn,
+                    IN ULONG    SectorCount);
 
 BOOLEAN STDCALL
 FsRtlSplitLargeMcb(IN PLARGE_MCB Mcb,
@@ -600,26 +582,18 @@ VOID STDCALL
 FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb,
                      IN LONGLONG Vbn);
 
-VOID
-STDCALL
-FsRtlTruncateMcb (
-       DWORD   Unknown0,
-       DWORD   Unknown1
-       );
-VOID
-STDCALL
-FsRtlUninitializeFileLock (
-    IN PFILE_LOCK FileLock
-    );
+VOID STDCALL
+FsRtlTruncateMcb (IN PMCB Mcb,
+                 IN VBN  Vbn);
+
+VOID STDCALL
+FsRtlUninitializeFileLock (IN PFILE_LOCK FileLock);
 
 VOID STDCALL
 FsRtlUninitializeLargeMcb(IN PLARGE_MCB Mcb);
 
-VOID
-STDCALL
-FsRtlUninitializeMcb (
-       DWORD   Unknown0
-       );
+VOID STDCALL
+FsRtlUninitializeMcb (IN PMCB Mcb);
 
 VOID STDCALL
 FsRtlUninitializeOplock(IN POPLOCK Oplock);
index c7ee5df..be4adec 100644 (file)
@@ -1,9 +1,15 @@
 #ifndef __INCLUDE_DDK_FSTYPES_H
 #define __INCLUDE_DDK_FSTYPES_H
-/* $Id: fstypes.h,v 1.9 2003/01/25 18:53:27 hbirr Exp $ */
+/* $Id: fstypes.h,v 1.10 2003/04/19 17:17:10 ea Exp $ */
 
 #define FSRTL_TAG      TAG('F','S','r','t')
 
+typedef ULONG LBN;
+typedef LBN *PLBN;
+
+typedef ULONG VBN;
+typedef VBN *PVBN;
+
 typedef struct _FILE_LOCK_INFO {
     LARGE_INTEGER   StartingByte;
     LARGE_INTEGER   Length;
@@ -80,6 +86,9 @@ typedef struct _LARGE_MCB
   PVOID Mapping;
 } LARGE_MCB, *PLARGE_MCB;
 
+typedef struct _MCB {
+    LARGE_MCB LargeMcb;
+} MCB, *PMCB;
 
 typedef VOID
 (*POPLOCK_WAIT_COMPLETE_ROUTINE)(PVOID Context,
index 734d639..01f67e6 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: mcb.c,v 1.5 2002/09/08 10:23:20 chorns Exp $
+/* $Id: mcb.c,v 1.6 2003/04/19 17:16:51 ea Exp $
  *
  * reactos/ntoskrnl/fs/mcb.c
  *
@@ -30,16 +30,14 @@ FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb,
 }
 
 
-VOID
-STDCALL
-FsRtlAddMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2,
-       DWORD   Unknown3
-       )
+BOOLEAN STDCALL
+FsRtlAddMcbEntry (IN PMCB     Mcb,
+                 IN VBN      Vbn,
+                 IN LBN      Lbn,
+                 IN ULONG    SectorCount)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
+  return(FALSE);
 }
 
 
@@ -55,17 +53,15 @@ FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb,
 }
 
 
-VOID
-STDCALL
-FsRtlGetNextMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2,
-       DWORD   Unknown3,
-       DWORD   Unknown4
-       )
+BOOLEAN STDCALL
+FsRtlGetNextMcbEntry (IN PMCB     Mcb,
+                     IN ULONG    RunIndex,
+                     OUT PVBN    Vbn,
+                     OUT PLBN    Lbn,
+                     OUT PULONG  SectorCount)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
+  return(FALSE);
 }
 
 
@@ -74,18 +70,16 @@ FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb,
                        IN POOL_TYPE PoolType)
 {
   UNIMPLEMENTED
-       Mcb->PoolType = PoolType;
+  Mcb->PoolType = PoolType;
 }
 
 
-VOID
-STDCALL
-FsRtlInitializeMcb (
-       DWORD   Unknown0,
-       DWORD   Unknown1
-       )
+VOID STDCALL
+FsRtlInitializeMcb (IN PMCB         Mcb,
+                   IN POOL_TYPE    PoolType)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
+  Mcb->LargeMcb.PoolType = PoolType;
 }
 
 
@@ -113,29 +107,25 @@ FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb,
 }
 
 
-VOID
-STDCALL
-FsRtlLookupLastMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2
-       )
+BOOLEAN STDCALL
+FsRtlLookupLastMcbEntry (IN PMCB     Mcb,
+                        OUT PVBN    Vbn,
+                        OUT PLBN    Lbn)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
+  return(FALSE);
 }
 
 
-VOID
-STDCALL
-FsRtlLookupMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2,
-       DWORD   Unknown3,
-       DWORD   Unknown4
-       )
+BOOLEAN STDCALL
+FsRtlLookupMcbEntry (IN PMCB     Mcb,
+                    IN VBN      Vbn,
+                    OUT PLBN    Lbn,
+                    OUT PULONG  SectorCount OPTIONAL,
+                    OUT PULONG  Index)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
+  return(FALSE);
 }
 
 
@@ -147,13 +137,11 @@ FsRtlNumberOfRunsInLargeMcb(IN PLARGE_MCB Mcb)
 }
 
 
-VOID
-STDCALL
-FsRtlNumberOfRunsInMcb (
-       DWORD   Unknown0
-       )
+ULONG STDCALL
+FsRtlNumberOfRunsInMcb (IN PMCB Mcb)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
+  return(0);
 }
 
 
@@ -166,15 +154,12 @@ FsRtlRemoveLargeMcbEntry(IN PLARGE_MCB Mcb,
 }
 
 
-VOID
-STDCALL
-FsRtlRemoveMcbEntry (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2
-       )
+VOID STDCALL
+FsRtlRemoveMcbEntry (IN PMCB     Mcb,
+                    IN VBN      Vbn,
+                    IN ULONG    SectorCount)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
 }
 
 
@@ -196,14 +181,11 @@ FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb,
 }
 
 
-VOID
-STDCALL
-FsRtlTruncateMcb (
-       DWORD   Unknown0,
-       DWORD   Unknown1
-       )
+VOID STDCALL
+FsRtlTruncateMcb (IN PMCB Mcb,
+                 IN VBN  Vbn)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
 }
 
 
@@ -214,13 +196,10 @@ FsRtlUninitializeLargeMcb(IN PLARGE_MCB Mcb)
 }
 
 
-VOID
-STDCALL
-FsRtlUninitializeMcb (
-       DWORD   Unknown0
-       )
+VOID STDCALL
+FsRtlUninitializeMcb (IN PMCB Mcb)
 {
-       UNIMPLEMENTED
+  UNIMPLEMENTED
 }