Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenfaulttol.c
Go to the documentation of this file.
00001 /* 00002 * PROJECT: ReactOS Kernel 00003 * LICENSE: GPL - See COPYING in the top level directory 00004 * FILE: ntoskrnl/fsrtl/faulttol.c 00005 * PURPOSE: Provides Fault Tolerance support for File System Drivers 00006 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) 00007 */ 00008 00009 /* INCLUDES ******************************************************************/ 00010 00011 #include <ntoskrnl.h> 00012 #include "ntddft.h" 00013 #define NDEBUG 00014 #include <debug.h> 00015 00016 /* PUBLIC FUNCTIONS **********************************************************/ 00017 00018 /*++ 00019 * @name FsRtlBalanceReads 00020 * @implemented NT 5.2 00021 * 00022 * The FsRtlBalanceReads routine sends an IRP to an FTDISK Driver 00023 * requesting the driver to balance read requests across a mirror set. 00024 * 00025 * @param TargetDevice 00026 * A pointer to an FTDISK Device Object. 00027 * 00028 * @return The NTSTATUS error code returned by the FTDISK Driver. 00029 * 00030 * @remarks FTDISK is a Software RAID Implementation. 00031 * 00032 *--*/ 00033 NTSTATUS 00034 NTAPI 00035 FsRtlBalanceReads(PDEVICE_OBJECT TargetDevice) 00036 { 00037 PIRP Irp; 00038 KEVENT Event; 00039 IO_STATUS_BLOCK IoStatusBlock; 00040 NTSTATUS Status; 00041 00042 /* Initialize the Local Event */ 00043 KeInitializeEvent(&Event, NotificationEvent, FALSE); 00044 00045 /* Build the special IOCTL */ 00046 Irp = IoBuildDeviceIoControlRequest(FT_BALANCED_READ_MODE, 00047 TargetDevice, 00048 NULL, 00049 0, 00050 NULL, 00051 0, 00052 FALSE, 00053 &Event, 00054 &IoStatusBlock); 00055 if (!Irp) return STATUS_INSUFFICIENT_RESOURCES; 00056 00057 /* Send it */ 00058 Status = IoCallDriver(TargetDevice, Irp); 00059 00060 /* Wait if needed */ 00061 if (Status == STATUS_PENDING) 00062 { 00063 Status = KeWaitForSingleObject(&Event, 00064 Executive, 00065 KernelMode, 00066 FALSE, 00067 NULL); 00068 ASSERT(Status == STATUS_SUCCESS); 00069 00070 /* Return Status */ 00071 Status = IoStatusBlock.Status; 00072 } 00073 00074 /* Return the status */ 00075 return Status; 00076 } 00077 00078 /*++ 00079 * @name FsRtlSyncVolumes 00080 * @implemented NT 5.2 00081 * 00082 * The FsRtlSyncVolumes routine is deprecated. 00083 * 00084 * @return Always returns STATUS_SUCCESS. 00085 * 00086 * @remarks Deprecated. 00087 * 00088 *--*/ 00089 NTSTATUS 00090 NTAPI 00091 FsRtlSyncVolumes(ULONG Unknown0, 00092 ULONG Unknown1, 00093 ULONG Unknown2) 00094 { 00095 /* Always return success */ 00096 return STATUS_SUCCESS; 00097 } Generated on Sat May 19 2012 04:35:07 for ReactOS by
1.7.6.1
|