ReactOS  0.4.14-dev-77-gd9e7c48
faulttol.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: ntoskrnl/fsrtl/faulttol.c
5  * PURPOSE: Provides Fault Tolerance support for File System Drivers
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include <ntoskrnl.h>
12 #include "ntddft.h"
13 #define NDEBUG
14 #include <debug.h>
15 
16 /* PUBLIC FUNCTIONS **********************************************************/
17 
18 /*++
19  * @name FsRtlBalanceReads
20  * @implemented NT 5.2
21  *
22  * The FsRtlBalanceReads routine sends an IRP to an FTDISK Driver
23  * requesting the driver to balance read requests across a mirror set.
24  *
25  * @param TargetDevice
26  * A pointer to an FTDISK Device Object.
27  *
28  * @return The NTSTATUS error code returned by the FTDISK Driver.
29  *
30  * @remarks FTDISK is a Software RAID Implementation.
31  *
32  *--*/
34 NTAPI
36 {
37  PIRP Irp;
38  KEVENT Event;
41 
42  /* Initialize the Local Event */
44 
45  /* Build the special IOCTL */
48  NULL,
49  0,
50  NULL,
51  0,
52  FALSE,
53  &Event,
54  &IoStatusBlock);
56 
57  /* Send it */
59 
60  /* Wait if needed */
61  if (Status == STATUS_PENDING)
62  {
64  Executive,
65  KernelMode,
66  FALSE,
67  NULL);
69 
70  /* Return Status */
72  }
73 
74  /* Return the status */
75  return Status;
76 }
77 
78 /*++
79  * @name FsRtlSyncVolumes
80  * @implemented NT 5.2
81  *
82  * The FsRtlSyncVolumes routine is deprecated.
83  *
84  * @return Always returns STATUS_SUCCESS.
85  *
86  * @remarks Deprecated.
87  *
88  *--*/
90 NTAPI
92  ULONG Unknown1,
93  ULONG Unknown2)
94 {
95  /* Always return success */
96  return STATUS_SUCCESS;
97 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
Definition: iofuncs.h:688
_In_ PIRP Irp
Definition: csq.h:116
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
smooth NULL
Definition: ftsmooth.c:416
#define STATUS_PENDING
Definition: ntstatus.h:82
NTSTATUS NTAPI FsRtlBalanceReads(PDEVICE_OBJECT TargetDevice)
Definition: faulttol.c:35
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Status
Definition: gdiplustypes.h:24
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define FT_BALANCED_READ_MODE
Definition: ntddft.h:31
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:881
unsigned int ULONG
Definition: retypes.h:1
return STATUS_SUCCESS
Definition: btrfs.c:2966
NTSTATUS NTAPI FsRtlSyncVolumes(ULONG Unknown0, ULONG Unknown1, ULONG Unknown2)
Definition: faulttol.c:91