Author: winesync Date: Tue Aug 1 16:50:11 2006 New Revision: 23405
URL: http://svn.reactos.org/svn/reactos?rev=23405&view=rev Log: Revert 23354 (causes a bugcheck). It will be committed when Alex has time to fix that issue.
Modified: trunk/reactos/ntoskrnl/KrnlFun.c trunk/reactos/ntoskrnl/include/internal/io.h trunk/reactos/ntoskrnl/io/iomgr/file.c trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/KrnlFun.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=2340... ============================================================================== --- trunk/reactos/ntoskrnl/KrnlFun.c (original) +++ trunk/reactos/ntoskrnl/KrnlFun.c Tue Aug 1 16:50:11 2006 @@ -9,12 +9,14 @@ // Failure to respect this will *ACHIEVE NOTHING*. // // Io: -// - Add tracing to iofunc.c, file.c and device.c +// - See why queueing IRPs and cancelling them causes crashes. // - Add Access Checks in IopParseDevice. // - Add validation checks in IoCreateFile. // - Add probe/alignment checks for Query/Set routines. +// - Add tracing to iofunc.c +// - Add tracing to file.c +// - Add support for some fast-paths when querying/setting data. // - Verify ShareAccess APIs, XP added some new semantics. -// - Add support for some fast-paths when querying/setting data. // - Add support for Fast Dispatch I/O. // // Ob:
Modified: trunk/reactos/ntoskrnl/include/internal/io.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/i... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/io.h (original) +++ trunk/reactos/ntoskrnl/include/internal/io.h Tue Aug 1 16:50:11 2006 @@ -16,8 +16,6 @@ // These define the Debug Masks Supported // #define IO_IRP_DEBUG 0x01 -#define IO_FO_DEBUG 0x02 -#define IO_DEVICE_DEBUG 0x04
// // Debug/Tracing support
Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?re... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/file.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c Tue Aug 1 16:50:11 2006 @@ -373,7 +373,7 @@ OpenPacket->FileObject = FileObject;
/* Queue the IRP and call the driver */ - IopQueueIrpToThread(Irp); + //IopQueueIrpToThread(Irp); Status = IoCallDriver(DeviceObject, Irp); if (Status == STATUS_PENDING) { @@ -404,7 +404,7 @@ FileObject->Event.Header.SignalState = 1;
/* Now that we've signaled the events, de-associate the IRP */ - IopUnQueueIrpFromThread(Irp); + //IopUnQueueIrpFromThread(Irp);
/* Check if the IRP had an input buffer */ if ((Irp->Flags & IRP_BUFFERED_IO) && @@ -611,7 +611,6 @@ NTSTATUS Status; KEVENT Event; PDEVICE_OBJECT DeviceObject; - KIRQL OldIrql;
/* Check if the file has a device object */ if (FileObject->DeviceObject) @@ -657,7 +656,7 @@ StackPtr->FileObject = FileObject;
/* Queue the IRP */ - IopQueueIrpToThread(Irp); + //IopQueueIrpToThread(Irp);
/* Call the FS Driver */ Status = IoCallDriver(DeviceObject, Irp); @@ -666,11 +665,6 @@ /* Wait for completion */ KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); } - - /* Raise to APC level and de-queue the IRP */ - KeRaiseIrql(APC_LEVEL, &OldIrql); - IopUnQueueIrpFromThread(Irp); - KeLowerIrql(OldIrql);
/* Free the IRP */ IoFreeIrp(Irp); @@ -836,7 +830,7 @@ }
/* Queue the IRP */ - IopQueueIrpToThread(Irp); + //IopQueueIrpToThread(Irp);
/* Update operation counts */ IopUpdateOperationCount(IopOtherTransfer); @@ -1030,7 +1024,6 @@ PIO_STACK_LOCATION StackPtr; NTSTATUS Status; PDEVICE_OBJECT DeviceObject; - KIRQL OldIrql;
/* Check if the file is locked and has more then one handle opened */ if ((FileObject->LockOperation) && (SystemHandleCount != 1)) @@ -1082,7 +1075,7 @@ StackPtr->FileObject = FileObject;
/* Queue the IRP */ - IopQueueIrpToThread(Irp); + //IopQueueIrpToThread(Irp);
/* Update operation counts */ IopUpdateOperationCount(IopOtherTransfer); @@ -1094,11 +1087,6 @@ /* Wait for completion */ KeWaitForSingleObject(&Event, UserRequest, KernelMode, FALSE, NULL); } - - /* Raise to APC level and de-queue the IRP */ - KeRaiseIrql(APC_LEVEL, &OldIrql); - IopUnQueueIrpFromThread(Irp); - KeLowerIrql(OldIrql);
/* Free the IRP */ IoFreeIrp(Irp);
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c?... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c Tue Aug 1 16:50:11 2006 @@ -13,8 +13,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <internal/debug.h> - -ULONG IopMissedOptimizations;
#if 0 IOTRACE(IO_IRP_DEBUG, @@ -129,7 +127,7 @@ PAGED_CODE();
/* Queue the IRP */ - IopQueueIrpToThread(Irp); + //IopQueueIrpToThread(Irp);
/* Update operation counts */ IopUpdateOperationCount(TransferType); @@ -451,7 +449,7 @@ }
/* Queue the IRP */ - IopQueueIrpToThread(Irp); + //IopQueueIrpToThread(Irp);
/* Call the Driver */ Status = IoCallDriver(FileObject->DeviceObject, Irp); @@ -698,17 +696,7 @@ StackPtr->Parameters.SetFile.Length = Length;
/* Queue the IRP */ - IopQueueIrpToThread(Irp); - - /* FIXME BUGBUG TEMPORARY CODE */ - if ((FileInformationClass == FileModeInformation) || - (FileInformationClass == FileRenameInformation ) || - (FileInformationClass == FileLinkInformation ) || - (FileInformationClass == FileMoveClusterInformation)) - { - DPRINT1("Missed optimization: %lx\n", FileInformationClass); - IopMissedOptimizations++; - } + //IopQueueIrpToThread(Irp);
/* Call the Driver */ Status = IoCallDriver(FileObject->DeviceObject, Irp); @@ -1647,20 +1635,10 @@ StackPtr->Parameters.QueryFile.Length = Length;
/* Queue the IRP */ - IopQueueIrpToThread(Irp); + //IopQueueIrpToThread(Irp);
/* Update operation counts */ IopUpdateOperationCount(IopOtherTransfer); - - /* FIXME BUGBUG TEMPORARY CODE */ - if ((FileInformationClass == FileAccessInformation) || - (FileInformationClass == FileModeInformation) || - (FileInformationClass == FileAlignmentInformation) || - (FileInformationClass == FileAllInformation)) - { - DPRINT1("Missed optimization: %lx\n", FileInformationClass); - IopMissedOptimizations++; - }
/* Call the Driver */ Status = IoCallDriver(DeviceObject, Irp); @@ -2203,22 +2181,12 @@ StackPtr->Parameters.SetFile.Length = Length;
/* Queue the IRP */ - IopQueueIrpToThread(Irp); + //IopQueueIrpToThread(Irp);
/* Update operation counts */ IopUpdateOperationCount(IopOtherTransfer);
- /* FIXME BUGBUG TEMPORARY CODE */ - if ((FileInformationClass == FileModeInformation) || - (FileInformationClass == FileRenameInformation ) || - (FileInformationClass == FileLinkInformation ) || - (FileInformationClass == FileMoveClusterInformation ) || - (FileInformationClass == FileDispositionInformation )) - { - DPRINT1("Missed optimization: %lx\n", FileInformationClass); - IopMissedOptimizations++; - } - + /* FIXME: Later, we can implement a lot of stuff here and avoid a driver call */ /* Handle IO Completion Port quickly */ if (FileInformationClass == FileCompletionInformation) {