Implement FsRtlAllocateResource, FsRtlIsPagingFile, FsRtlBalanceReads. Fix some incorrect function prototypes, rename mdl.c to fastio.c and add some more functions to it. Implement FsRtlGetfileSize to use fastio, combine dbcsname.c and name.c and pretty-fy the array, clean up some ugly formatting. Create context.c and move stream/file context routines there.
Modified: trunk/reactos/include/ddk/fsfuncs.h
Modified: trunk/reactos/ntoskrnl/Makefile
Added: trunk/reactos/ntoskrnl/fs/context.c
Deleted: trunk/reactos/ntoskrnl/fs/dbcsname.c
Added: trunk/reactos/ntoskrnl/fs/fastio.c
Deleted: trunk/reactos/ntoskrnl/fs/mdl.c
Modified: trunk/reactos/ntoskrnl/fs/name.c
Modified: trunk/reactos/ntoskrnl/fs/util.c
Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
Modified: trunk/reactos/ntoskrnl/ntoskrnl.def

Modified: trunk/reactos/include/ddk/fsfuncs.h
--- trunk/reactos/include/ddk/fsfuncs.h	2005-05-07 15:58:58 UTC (rev 15083)
+++ trunk/reactos/include/ddk/fsfuncs.h	2005-05-07 17:44:54 UTC (rev 15084)
@@ -84,7 +84,7 @@
 	IN	ULONG		NumberOfBytes,
 	IN	ULONG		Tag
 	);
-DWORD
+PERESOURCE
 STDCALL
 FsRtlAllocateResource (
 	VOID
@@ -351,7 +351,7 @@
 BOOLEAN STDCALL
 FsRtlIsNtstatusExpected(IN NTSTATUS NtStatus);
 
-ULONG
+BOOLEAN STDCALL
 FsRtlIsPagingFile (
     IN PFILE_OBJECT FileObject
     );

Modified: trunk/reactos/ntoskrnl/Makefile
--- trunk/reactos/ntoskrnl/Makefile	2005-05-07 15:58:58 UTC (rev 15083)
+++ trunk/reactos/ntoskrnl/Makefile	2005-05-07 17:44:54 UTC (rev 15084)
@@ -239,10 +239,10 @@
 
 # Installable File System Run-Time Library (FsRtl)
 OBJECTS_FS = \
-	fs/dbcsname.o \
+	fs/context.o \
+	fs/fastio.o \
 	fs/filelock.o \
 	fs/mcb.o \
-	fs/mdl.o \
 	fs/name.o \
 	fs/notify.o \
 	fs/oplock.o \

Added: trunk/reactos/ntoskrnl/fs/context.c
--- trunk/reactos/ntoskrnl/fs/context.c	2005-05-07 15:58:58 UTC (rev 15083)
+++ trunk/reactos/ntoskrnl/fs/context.c	2005-05-07 17:44:54 UTC (rev 15084)
@@ -0,0 +1,81 @@
+/*
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS kernel
+ * FILE:            ntoskrnl/fs/context.c
+ * PURPOSE:         File and Stream Context Functions
+ *
+ * PROGRAMMERS:     Alex Ionescu (alex@relsoft.net)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntoskrnl.h>
+#include <internal/debug.h>
+
+/* GLOBALS *******************************************************************/
+
+/* PRIVATE FUNCTIONS**********************************************************/
+
+/* FUNCTIONS *****************************************************************/
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+STDCALL
+FsRtlInsertPerStreamContext(IN PFSRTL_ADVANCED_FCB_HEADER PerStreamContext,
+                            IN PFSRTL_PER_STREAM_CONTEXT Ptr)
+{
+    UNIMPLEMENTED;
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+/*
+ * @unimplemented
+ */
+PFSRTL_PER_STREAM_CONTEXT
+STDCALL
+FsRtlRemovePerStreamContext(IN PFSRTL_ADVANCED_FCB_HEADER StreamContext,
+                            IN PVOID OwnerId OPTIONAL,
+                            IN PVOID InstanceId OPTIONAL)
+{
+    UNIMPLEMENTED;
+    return NULL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+STDCALL
+FsRtlInsertPerFileObjectContext(IN PFSRTL_ADVANCED_FCB_HEADER PerFileObjectContext,
+                                IN PVOID /* PFSRTL_PER_FILE_OBJECT_CONTEXT*/ Ptr)
+{
+    UNIMPLEMENTED;
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+/*
+ * @unimplemented
+ */
+PVOID /* PFSRTL_PER_FILE_OBJECT_CONTEXT*/
+STDCALL
+FsRtlRemovePerFileObjectContext(IN PFSRTL_ADVANCED_FCB_HEADER PerFileObjectContext,
+                                IN PVOID OwnerId OPTIONAL,
+                                IN PVOID InstanceId OPTIONAL)
+{
+    UNIMPLEMENTED;
+    return NULL;
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+STDCALL
+FsRtlTeardownPerStreamContexts(IN PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader)
+{
+    UNIMPLEMENTED;
+}
+
+/* EOF */

Deleted: trunk/reactos/ntoskrnl/fs/dbcsname.c
--- trunk/reactos/ntoskrnl/fs/dbcsname.c	2005-05-07 15:58:58 UTC (rev 15083)
+++ trunk/reactos/ntoskrnl/fs/dbcsname.c	2005-05-07 17:44:54 UTC (rev 15084)
@@ -1,322 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
- * FILE:            ntoskrnl/fs/dbcsname.c
- * PURPOSE:         No purpose listed.
- *
- * PROGRAMMERS:     No programmer listed.
- */
-
-#include <ntoskrnl.h>
-
-/* DATA ********************************************************************/
-
-static UCHAR LegalAnsiCharacterArray[] =
-{
-  0,								/* CTRL+@, 0x00 */
-  0,								/* CTRL+A, 0x01 */
-  0,								/* CTRL+B, 0x02 */
-  0,								/* CTRL+C, 0x03 */
-  0,								/* CTRL+D, 0x04 */
-  0,								/* CTRL+E, 0x05 */
-  0,								/* CTRL+F, 0x06 */
-  0,								/* CTRL+G, 0x07 */
-  0,								/* CTRL+H, 0x08 */
-  0,								/* CTRL+I, 0x09 */
-  0,								/* CTRL+J, 0x0a */
-  0,								/* CTRL+K, 0x0b */
-  0,								/* CTRL+L, 0x0c */
-  0,								/* CTRL+M, 0x0d */
-  0,								/* CTRL+N, 0x0e */
-  0,								/* CTRL+O, 0x0f */
-  0,								/* CTRL+P, 0x10 */
-  0,								/* CTRL+Q, 0x11 */
-  0,								/* CTRL+R, 0x12 */
-  0,								/* CTRL+S, 0x13 */
-  0,								/* CTRL+T, 0x14 */
-  0,								/* CTRL+U, 0x15 */
-  0,								/* CTRL+V, 0x16 */
-  0,								/* CTRL+W, 0x17 */
-  0,								/* CTRL+X, 0x18 */
-  0,								/* CTRL+Y, 0x19 */
-  0,								/* CTRL+Z, 0x1a */
-  0,								/* CTRL+[, 0x1b */
-  0,								/* CTRL+\, 0x1c */
-  0,								/* CTRL+], 0x1d */
-  0,								/* CTRL+^, 0x1e */
-  0,								/* CTRL+_, 0x1f */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* ` ', 0x20 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `!', 0x21 */
-  FSRTL_WILD_CHARACTER,						/* `"', 0x22 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `#', 0x23 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `$', 0x24 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `%', 0x25 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `&', 0x26 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `'', 0x27 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `(', 0x28 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `)', 0x29 */
-  FSRTL_WILD_CHARACTER,						/* `*', 0x2a */
-  FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,				/* `+', 0x2b */
-  FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,				/* `,', 0x2c */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `-', 0x2d */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `.', 0x2e */
-  0,								/* `/', 0x2f */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `0', 0x30 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `1', 0x31 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `2', 0x32 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `3', 0x33 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `4', 0x34 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `5', 0x35 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `6', 0x36 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `7', 0x37 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `8', 0x38 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `9', 0x39 */
-  FSRTL_NTFS_LEGAL,						/* `:', 0x3a */
-  FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,				/* `;', 0x3b */
-  FSRTL_WILD_CHARACTER,						/* `<', 0x3c */
-  FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,				/* `=', 0x3d */
-  FSRTL_WILD_CHARACTER,						/* `>', 0x3e */
-  FSRTL_WILD_CHARACTER,						/* `?', 0x3f */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `@', 0x40 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `A', 0x41 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `B', 0x42 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `C', 0x43 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `D', 0x44 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `E', 0x45 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `F', 0x46 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `G', 0x47 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `H', 0x48 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `I', 0x49 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `J', 0x4a */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `K', 0x4b */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `L', 0x4c */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `M', 0x4d */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `N', 0x4e */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `O', 0x4f */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `P', 0x50 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `Q', 0x51 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `R', 0x52 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `S', 0x53 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `T', 0x54 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `U', 0x55 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `V', 0x56 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `W', 0x57 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `X', 0x58 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `Y', 0x59 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `Z', 0x5a */
-  FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,				/* `[', 0x5b */
-  0,								/* `\', 0x5c */
-  FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,				/* `]', 0x5d */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `^', 0x5e */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `_', 0x5f */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* ``', 0x60 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `a', 0x61 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `b', 0x62 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `c', 0x63 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `d', 0x64 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `e', 0x65 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `f', 0x66 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `g', 0x67 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `h', 0x68 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `i', 0x69 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `j', 0x6a */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `k', 0x6b */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `l', 0x6c */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `m', 0x6d */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `n', 0x6e */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `o', 0x6f */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `p', 0x70 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `q', 0x71 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `r', 0x72 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `s', 0x73 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `t', 0x74 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `u', 0x75 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `v', 0x76 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `w', 0x77 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `x', 0x78 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `y', 0x79 */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `z', 0x7a */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `{', 0x7b */
-  0,								/* `|', 0x7c */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `}', 0x7d */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL,	/* `~', 0x7e */
-  FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL		/* 0x7f */
-};
-
-PUCHAR EXPORTED FsRtlLegalAnsiCharacterArray = LegalAnsiCharacterArray;
-
-
-/* FUNCTIONS ***************************************************************/
-
-/**********************************************************************
- * NAME							EXPORTED
- *	FsRtlDissectDbcs@16
- *
- *	Dissects a given path name into first and remaining part.
- *
- * ARGUMENTS
- *	Name
- *		ANSI string to dissect.
- *
- *	FirstPart
- *		Pointer to user supplied ANSI_STRING, that will
- *		later point to the first part of the original name.
- *
- *	RemainingPart
- *		Pointer to user supplied ANSI_STRING, that will
- *		later point to the remaining part of the original name.
- *
- * RETURN VALUE
- *	None
- *
- * EXAMPLE
- *	Name:		\test1\test2\test3
- *	FirstPart:	test1
- *	RemainingPart:	test2\test3
- *
- * @implemented
- */
-VOID STDCALL
-FsRtlDissectDbcs(IN ANSI_STRING Name,
-		 OUT PANSI_STRING FirstPart,
-		 OUT PANSI_STRING RemainingPart)
-{
-    ULONG i;
-    ULONG FirstLoop;
-    
-    /* Initialize the Outputs */
-    RtlZeroMemory(&FirstPart, sizeof(ANSI_STRING));
-    RtlZeroMemory(&RemainingPart, sizeof(ANSI_STRING));
-    
-    /* Bail out if empty */
-    if (!Name.Length) return;
-    
-    /* Ignore backslash */
-    if (Name.Buffer[0] == '\\') {
-        i = 1;
-    } else {
-        i = 0;
-    }
-    
-    /* Loop until we find a backslash */
-    for (FirstLoop = i;i < Name.Length;i++) {
-        if (Name.Buffer[i] != '\\') break;
-        if (FsRtlIsLeadDbcsCharacter(Name.Buffer[i])) i++;
-    }
-    
-    /* Now we have the First Part */
-    FirstPart->Length = (i-FirstLoop);
-    FirstPart->MaximumLength = FirstPart->Length; /* +2?? */
-    FirstPart->Buffer = &Name.Buffer[FirstLoop];
-    
-    /* Make the second part if something is still left */
-    if (i<Name.Length) {
-        RemainingPart->Length = (Name.Length - (i+1));
-        RemainingPart->MaximumLength = RemainingPart->Length; /* +2?? */
-        RemainingPart->Buffer = &Name.Buffer[i+1];
-    }
-    
-    return;
-}
-
-
-/**********************************************************************
- * NAME							EXPORTED
- *	FsRtlDoesDbcsContainWildCards@4
- *
- * DESCRIPTION
- *	
- * ARGUMENTS
- *
- * RETURN VALUE
- *
- * @implemented
- */
-BOOLEAN STDCALL
-FsRtlDoesDbcsContainWildCards(IN PANSI_STRING Name)
-{
-    ULONG i;
-    
-    /* Check every character */
-    for (i=0;i < Name->Length;i++) {
-        
-        /* First make sure it's not the Lead DBCS */
-        if (FsRtlIsLeadDbcsCharacter(Name->Buffer[i])) {
-            i++;
-        } else if (FsRtlIsAnsiCharacterWild(Name->Buffer[i])) {
-            /* Now return if it has a Wilcard */
-            return TRUE;
-        }
-    }
-    
-    /* We didn't return above...so none found */
-    return FALSE;
-}
-
-
-/**********************************************************************
- * NAME							EXPORTED
- *	FsRtlIsDbcsInExpression@8
- *
- * DESCRIPTION
- *	
- * ARGUMENTS
- *
- * RETURN VALUE
- *
- * @unimplemented
- */
-BOOLEAN STDCALL
-FsRtlIsDbcsInExpression(IN PANSI_STRING Expression,
-			IN PANSI_STRING Name)
-{
-  return FALSE;
-}
-
-
-/**********************************************************************
- * NAME							EXPORTED
- *	FsRtlIsFatDbcsLegal@20
- *
- * DESCRIPTION
- *	
- * ARGUMENTS
- *
- * RETURN VALUE
- *
- * @unimplemented
- */
-BOOLEAN
-STDCALL
-FsRtlIsFatDbcsLegal(IN ANSI_STRING DbcsName, 
-                    IN BOOLEAN WildCardsPermissible, 
-                    IN BOOLEAN PathNamePermissible, 
-                    IN BOOLEAN LeadingBackslashPermissible) 
-{
-  return FALSE;
-}
-
-
-/**********************************************************************
- * NAME							EXPORTED
- *	FsRtlIsHpfsDbcsLegal@20
- *
- * DESCRIPTION
- *	
- * ARGUMENTS
- *
- * RETURN VALUE
- *
- * @unimplemented
- */
-BOOLEAN STDCALL
-FsRtlIsHpfsDbcsLegal(IN ANSI_STRING DbcsName, 
-                     IN BOOLEAN WildCardsPermissible, 
-                     IN BOOLEAN PathNamePermissible, 
-                     IN BOOLEAN LeadingBackslashPermissible) 
-{
-  return FALSE;
-}
-
-/* EOF */

Added: trunk/reactos/ntoskrnl/fs/fastio.c
--- trunk/reactos/ntoskrnl/fs/fastio.c	2005-05-07 15:58:58 UTC (rev 15083)
+++ trunk/reactos/ntoskrnl/fs/fastio.c	2005-05-07 17:44:54 UTC (rev 15084)
@@ -0,0 +1,513 @@
+/*
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS Kernel
+ * FILE:            ntoskrnl/fs/fastio.c
+ * PURPOSE:         File System Routines which support Fast I/O or Cc Access.
+ *
+ * PROGRAMMERS:     Alex Ionescu (alex@relsoft.net)
+ */
+
+/* INCLUDES ****************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <internal/debug.h>
+
+/* GLOBALS *******************************************************************/
+
+extern ULONG CcFastReadResourceMiss;
+extern ULONG CcFastReadNoWait;
+
+/* FUNCTIONS *****************************************************************/
+
+/*
+ * @implemented
+ */
+VOID
+STDCALL
+FsRtlIncrementCcFastReadResourceMiss( VOID )
+{
+    CcFastReadResourceMiss++;
+}
+
+/*
+ * @implemented
+ */
+VOID
+STDCALL
+FsRtlIncrementCcFastReadNotPossible( VOID )
+{
+    CcFastReadNotPossible++;
+}
+
+/*
+ * @implemented
+ */
+VOID
+STDCALL
+FsRtlIncrementCcFastReadWait( VOID )
+{
+    CcFastReadWait++;
+}
+
+/*
+ * @implemented
+ */
+VOID
+STDCALL
+FsRtlIncrementCcFastReadNoWait( VOID )
+{
+    CcFastReadNoWait++;
+}
+
+/*
+ * NAME    EXPORTED
+ * FsRtlCopyRead@32
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * NOTE
+ *  From Bo Branten's ntifs.h v12.
+ * 
+ * @unimplemented
+ */
+BOOLEAN
+STDCALL
+FsRtlCopyRead(IN  PFILE_OBJECT FileObject,
+              IN  PLARGE_INTEGER FileOffset,
+              IN  ULONG Length,
+              IN  BOOLEAN Wait,
+              IN  ULONG LockKey,
+              OUT PVOID Buffer,
+              OUT PIO_STATUS_BLOCK IoStatus,
+              IN  PDEVICE_OBJECT DeviceObject)
+{
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+/*
+ * NAME    EXPORTED
+ * FsRtlCopyWrite@32
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ * 
+ * NOTE
+ *  From Bo Branten's ntifs.h v12.
+ *
+ * @unimplemented
+ */
+BOOLEAN
+STDCALL
+FsRtlCopyWrite(IN  PFILE_OBJECT FileObject,
+               IN  PLARGE_INTEGER FileOffset,
+               IN  ULONG Length,
+               IN  BOOLEAN Wait,
+               IN  ULONG LockKey,
+               OUT PVOID Buffer,
+               OUT PIO_STATUS_BLOCK IoStatus,
+               IN  PDEVICE_OBJECT DeviceObject)
+{
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+/*
+ * NAME    EXPORTED
+ * FsRtlGetFileSize@8
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ * 
+ * @implemented
+ */
+NTSTATUS
+STDCALL
+FsRtlGetFileSize(IN PFILE_OBJECT  FileObject,
+                 IN OUT PLARGE_INTEGER FileSize)
+{
+    FILE_STANDARD_INFORMATION Info;
+    NTSTATUS Status;
+    IO_STATUS_BLOCK IoStatusBlock;
+    ULONG Length;
+    PDEVICE_OBJECT DeviceObject;
+    PFAST_IO_DISPATCH FastDispatch;
+    
+    /* Get Device Object and Fast Calls */
+    DeviceObject = IoGetRelatedDeviceObject(FileObject);
+    FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
+    
+    /* Check if we support Fast Calls, and check this one */
+    if (FastDispatch && FastDispatch->FastIoQueryStandardInfo)    
+    {
+        /* Fast Path */
+        FastDispatch->FastIoQueryStandardInfo(FileObject,    
+                                              TRUE,
+                                              &Info,
+                                              &IoStatusBlock,
+                                              DeviceObject);
+        Status = IoStatusBlock.Status;
+    }
+    else
+    {
+        /* Slow Path */
+        Status = IoQueryFileInformation(FileObject,
+                                        FileStandardInformation,
+                                        sizeof(Info),
+                                        &Info,
+                                        &Length);
+    }
+    
+    /* Check success */
+    if (NT_SUCCESS(Status))
+    {
+        *FileSize = Info.EndOfFile;
+    }
+
+    /* Return status */
+    return Status;
+}
+
+/*
+ * NAME    EXPORTED
+ * FsRtlMdlRead@24
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * @implemented
+ */
+BOOLEAN
+STDCALL
+FsRtlMdlRead(IN PFILE_OBJECT FileObject,
+             IN PLARGE_INTEGER FileOffset,
+             IN ULONG Length,
+             IN ULONG LockKey,
+             OUT PMDL *MdlChain,
+             OUT PIO_STATUS_BLOCK IoStatus)
+{
+    PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
+    PFAST_IO_DISPATCH FastDispatch;
+    
+    /* Get Device Object and Fast Calls */
+    DeviceObject = IoGetRelatedDeviceObject(FileObject);
+    FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
+    
+    /* Check if we support Fast Calls, and check this one */
+    if (FastDispatch && FastDispatch->MdlRead)
+    {
+        /* Use the fast path */
+        return FastDispatch->MdlRead(FileObject,
+                                     FileOffset,
+                                     Length,
+                                     LockKey,
+                                     MdlChain,
+                                     IoStatus,
+                                     DeviceObject);
+    }
+    
+    /* Get the Base File System (Volume) and Fast Calls */
+    BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
+    FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch;
+    
+    /* If the Base Device Object has its own FastDispatch Routine, fail */
+    if (FastDispatch && FastDispatch->MdlRead && 
+        BaseDeviceObject != DeviceObject)
+    {
+        return FALSE;
+    }
+    
+    /* No fast path, use slow path */
+    return FsRtlMdlReadDev(FileObject,
+                           FileOffset,
+                           Length,
+                           LockKey,
+                           MdlChain,
+                           IoStatus,
+                           DeviceObject);
+}
+
+/*
+ * NAME    EXPORTED
+ * FsRtlMdlReadComplete@8
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * @implemented
+ */
+BOOLEAN 
+STDCALL
+FsRtlMdlReadComplete(IN PFILE_OBJECT FileObject,
+                     IN OUT PMDL MdlChain)
+{
+    PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
+    PFAST_IO_DISPATCH FastDispatch;
+    
+    /* Get Device Object and Fast Calls */
+    DeviceObject = IoGetRelatedDeviceObject(FileObject);
+    FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
+    
+    /* Check if we support Fast Calls, and check this one */
+    if (FastDispatch && FastDispatch->MdlReadComplete)
+    {
+        /* Use the fast path */
+        return FastDispatch->MdlReadComplete(FileObject,
+                                             MdlChain,
+                                             DeviceObject);
+    }
+    
+    /* Get the Base File System (Volume) and Fast Calls */
+    BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
+    FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch;
+    
+    /* If the Base Device Object has its own FastDispatch Routine, fail */
+    if (FastDispatch && FastDispatch->MdlReadComplete && 
+        BaseDeviceObject != DeviceObject)
+    {
+        return FALSE;
+    }
+    
+    /* No fast path, use slow path */
+    return FsRtlMdlReadCompleteDev(FileObject, MdlChain, DeviceObject);
+}
+
+
+/*
+ * NAME    EXPORTED
+ * FsRtlMdlReadCompleteDev@12
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * NOTE
+ * From Bo Branten's ntifs.h v13.
+ * (CcMdlReadCompleteDev declared in internal/cc.h)
+ *
+ * @implemented
+ */
+BOOLEAN
+STDCALL
+FsRtlMdlReadCompleteDev(IN PFILE_OBJECT FileObject,
+                        IN PMDL MdlChain,
+                        IN PDEVICE_OBJECT DeviceObject)
+{
+    /* Call the Cache Manager */
+    CcMdlReadCompleteDev(MdlChain, FileObject);
+    return TRUE;
+}
+
+/*
+ * NAME    EXPORTED
+ * FsRtlMdlReadDev@28
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * @unimplemented
+ */
+BOOLEAN
+STDCALL
+FsRtlMdlReadDev(IN PFILE_OBJECT FileObject,
+                IN PLARGE_INTEGER FileOffset,
+                IN ULONG Length,
+                IN ULONG LockKey,
+                OUT PMDL *MdlChain,
+                OUT PIO_STATUS_BLOCK IoStatus,
+                IN PDEVICE_OBJECT DeviceObject)
+{
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+
+/*
+ * NAME    EXPORTED
+ * FsRtlMdlWriteComplete@12
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * @implemented
+ */
+BOOLEAN
+STDCALL
+FsRtlMdlWriteComplete(IN PFILE_OBJECT FileObject,
+                      IN PLARGE_INTEGER FileOffset,
+                      IN PMDL MdlChain)
+{
+    PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
+    PFAST_IO_DISPATCH FastDispatch;
+    
+    /* Get Device Object and Fast Calls */
+    DeviceObject = IoGetRelatedDeviceObject(FileObject);
+    FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
+    
+    /* Check if we support Fast Calls, and check this one */
+    if (FastDispatch && FastDispatch->MdlWriteComplete)
+    {
+        /* Use the fast path */
+        return FastDispatch->MdlWriteComplete(FileObject,
+                                              FileOffset,
+                                              MdlChain,
+                                              DeviceObject);
+    }
+    
+    /* Get the Base File System (Volume) and Fast Calls */
+    BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
+    FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch;
+    
+    /* If the Base Device Object has its own FastDispatch Routine, fail */
+    if (FastDispatch && FastDispatch->MdlWriteComplete && 
+        BaseDeviceObject != DeviceObject)
+    {
+        return FALSE;
+    }
+    
+    /* No fast path, use slow path */
+    return FsRtlMdlWriteCompleteDev(FileObject, 
+                                    FileOffset, 
+                                    MdlChain, 
+                                    DeviceObject);
+}
+
+/*
+ * NAME EXPORTED
+ * FsRtlMdlWriteCompleteDev@16
+ *
+ * DESCRIPTION
+ * 
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * @implemented
+ */
+BOOLEAN
+STDCALL
+FsRtlMdlWriteCompleteDev(IN PFILE_OBJECT FileObject,
+                         IN PLARGE_INTEGER FileOffset,
+                         IN PMDL MdlChain,
+                         IN PDEVICE_OBJECT DeviceObject)
+{
+    /* Call the Cache Manager */
+    CcMdlWriteCompleteDev(FileOffset, MdlChain, FileObject);
+    return TRUE;
+}
+
+
+/*
+ * NAME    EXPORTED
+ * FsRtlPrepareMdlWrite@24
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * @implemented
+ */
+BOOLEAN
+STDCALL
+FsRtlPrepareMdlWrite(IN  PFILE_OBJECT FileObject,
+                     IN  PLARGE_INTEGER FileOffset,
+                     IN  ULONG Length,
+                     IN  ULONG LockKey,
+                     OUT PMDL *MdlChain,
+                     OUT PIO_STATUS_BLOCK IoStatus)
+{
+    PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
+    PFAST_IO_DISPATCH FastDispatch;
+    
+    /* Get Device Object and Fast Calls */
+    DeviceObject = IoGetRelatedDeviceObject(FileObject);
+    FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
+    
+    /* Check if we support Fast Calls, and check this one */
+    if (FastDispatch && FastDispatch->PrepareMdlWrite)
+    {
+        /* Use the fast path */
+        return FastDispatch->PrepareMdlWrite(FileObject,
+                                             FileOffset,
+                                             Length,
+                                             LockKey,
+                                             MdlChain,
+                                             IoStatus,
+                                             DeviceObject);
+    }
+    
+    /* Get the Base File System (Volume) and Fast Calls */
+    BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
+    FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch;
+    
+    /* If the Base Device Object has its own FastDispatch Routine, fail */
+    if (FastDispatch && FastDispatch->PrepareMdlWrite && 
+        BaseDeviceObject != DeviceObject)
+    {
+        return FALSE;
+    }
+    
+    /* No fast path, use slow path */
+    return FsRtlPrepareMdlWriteDev(FileObject,
+                                   FileOffset,
+                                   Length,
+                                   LockKey,
+                                   MdlChain,
+                                   IoStatus,
+                                   DeviceObject);
+}
+
+/*
+ * NAME EXPORTED
+ * FsRtlPrepareMdlWriteDev@28
+ *
+ * DESCRIPTION
+ *	
+ * ARGUMENTS
+ *
+ * RETURN VALUE
+ *
+ * @unimplemented
+ */
+BOOLEAN
+STDCALL
+FsRtlPrepareMdlWriteDev(IN  PFILE_OBJECT FileObject,
+                        IN  PLARGE_INTEGER FileOffset,
+                        IN  ULONG Length,
+                        IN  ULONG LockKey,
+                        OUT PMDL *MdlChain,
+                        OUT PIO_STATUS_BLOCK IoStatus,
+                        IN PDEVICE_OBJECT DeviceObject)
+{
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+/* EOF */

Deleted: trunk/reactos/ntoskrnl/fs/mdl.c
--- trunk/reactos/ntoskrnl/fs/mdl.c	2005-05-07 15:58:58 UTC (rev 15083)
+++ trunk/reactos/ntoskrnl/fs/mdl.c	2005-05-07 17:44:54 UTC (rev 15084)
@@ -1,395 +0,0 @@
-/*
- * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS Kernel
- * FILE:            ntoskrnl/fs/mdl.c
- * PURPOSE:         Cached MDL Access Helper Routines for File System Drivers
- *
- * PROGRAMMERS:     Alex Ionescu (alex@relsoft.net)
- */
-
-/* INCLUDES ****************************************************************/
-
-#include <ntoskrnl.h>
-#define NDEBUG
-#include <internal/debug.h>
-
-/* GLOBALS *******************************************************************/
-
-extern ULONG CcFastReadResourceMiss;
-extern ULONG CcFastReadNoWait;
-
-/* FUNCTIONS *****************************************************************/
-
-/*
- * @implemented
- */
[truncated at 1000 lines; 1544 more skipped]