22#define BugCheckFileId (FAT_BUG_CHECK_DEVIOSUP)
28#define Dbg (DEBUG_TRACE_DEVIOSUP)
30#define CollectDiskIoStats(VCB,FUNCTION,IS_USER_IO,COUNT) { \
31 PFILESYSTEM_STATISTICS Stats = &(VCB)->Statistics[KeGetCurrentProcessorNumber() % FatData.NumberProcessors].Common; \
33 if ((FUNCTION) == IRP_MJ_WRITE) { \
34 Stats->UserDiskWrites += (COUNT); \
36 Stats->UserDiskReads += (COUNT); \
39 if ((FUNCTION) == IRP_MJ_WRITE) { \
40 Stats->MetaDataDiskWrites += (COUNT); \
42 Stats->MetaDataDiskReads += (COUNT); \
163#define FatLowLevelReadWrite(IRPCONTEXT,DO,IRP,VCB) ( \
164 IoCallDriver((DO),(IRP)) \
171#define FatDoCompletionZero( I, C ) \
172 if ((C)->ZeroMdl) { \
173 NT_ASSERT( (C)->ZeroMdl->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \
174 MDL_SOURCE_IS_NONPAGED_POOL));\
175 if (NT_SUCCESS((I)->IoStatus.Status)) { \
176 RtlZeroMemory( (C)->ZeroMdl->MappedSystemVa, \
177 (C)->ZeroMdl->ByteCount ); \
179 IoFreeMdl((C)->ZeroMdl); \
180 (C)->ZeroMdl = NULL; \
183#if (NTDDI_VERSION >= NTDDI_WIN8)
184#define FatUpdateIOCountersPCW(IsAWrite,Count) \
185 FsRtlUpdateDiskCounters( ((IsAWrite) ? 0 : (Count) ), \
186 ((IsAWrite) ? (Count) : 0) )
188#define FatUpdateIOCountersPCW(IsAWrite,Count)
192#pragma alloc_text(PAGE, FatMultipleAsync)
193#pragma alloc_text(PAGE, FatSingleAsync)
194#pragma alloc_text(PAGE, FatSingleNonAlignedSync)
195#pragma alloc_text(PAGE, FatWaitSync)
196#pragma alloc_text(PAGE, FatLockUserBuffer)
197#pragma alloc_text(PAGE, FatBufferUserBuffer)
198#pragma alloc_text(PAGE, FatMapUserBuffer)
199#pragma alloc_text(PAGE, FatNonCachedIo)
200#pragma alloc_text(PAGE, FatNonCachedNonAlignedRead)
201#pragma alloc_text(PAGE, FatPerformDevIoCtrl)
249 ULONG RemainingByteCount;
307#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
312#if (NTDDI_VERSION >= NTDDI_WIN8)
324 IsWriteOperation =
TRUE;
330 (IsWriteOperation ? 0 : 1),
331 (IsWriteOperation ? 1 : 0),
416#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
421 CurrentIndex = FirstIndex;
446 Irp->AssociatedIrp.IrpCount = IrpCount = LastIndex - FirstIndex + 1;
448 while (CurrentIndex <= LastIndex) {
464 RemainingByteCount = 0;
500 (
PCHAR)
Irp->UserBuffer + BufferOffset,
518 (CurrentIndex == LastIndex &&
519 RemainingByteCount == 0))) {
524 if (AssocIrp ==
NULL) {
536 while (
Irp->AssociatedIrp.IrpCount != IrpCount) {
606 AssocIrp->MdlAddress =
Mdl;
676 IrpIsMaster = MdlIsReserve =
FALSE;
699 Vbo += NextByteCount;
700 BufferOffset += NextByteCount;
708 if (RemainingByteCount) {
714 NextLbo += NextByteCount;
715 NextVbo += NextByteCount;
717 NextByteCount = RemainingByteCount;
723 if ( CurrentIndex <= LastIndex ) {
745 while (
Irp->AssociatedIrp.IrpCount != IrpCount) {
757#if (NTDDI_VERSION >= NTDDI_WIN8)
806 if ((
Irp->Tail.Overlay.Thread !=
NULL) &&
809 OriginatingThread =
Irp->Tail.Overlay.Thread;
845 if ((
Irp->Tail.Overlay.Thread !=
NULL) &&
848 OriginatingThread =
Irp->Tail.Overlay.Thread;
865 if (OriginatingThread !=
NULL) {
948 ULONG OriginalByteCount;
962 DebugTrace( 0,
Dbg,
"MajorFunction = %08lx\n", IrpContext->MajorFunction );
991#if (NTDDI_VERSION >= NTDDI_WIN8)
1053 IrpContext->FatIoContext->ZeroMdl =
Mdl;
1072 FatLookupFileAllocation( IrpContext,
1088 if ( !NextIsAllocated ) {
1090 FatPopUpFileCorrupt( IrpContext,
FcbOrDcb );
1126 DebugTrace( 0,
Dbg,
"Passing 1 Irp on to Disk Driver\n", 0 );
1141 FatLookupFileAllocation( IrpContext,
1156 if ( !LastIsAllocated ) {
1158 FatPopUpFileCorrupt( IrpContext,
FcbOrDcb );
1166 (LastIndex - FirstIndex + 1) *
sizeof(
IO_RUN),
1171 IoRuns = StackIoRuns;
1176 CurrentIndex = FirstIndex;
1182 while (CurrentIndex <= LastIndex) {
1206 IoRuns[NextRun].Lbo = NextLbo;
1207 IoRuns[NextRun].Offset = BufferOffset;
1208 IoRuns[NextRun].ByteCount = NextByteCount;
1216 BufferOffset += NextByteCount;
1225 if ( CurrentIndex <= LastIndex ) {
1249 Irp->IoStatus.Information = OriginalByteCount;
1262 DebugTrace( 0,
Dbg,
"Passing Multiple Irps on to Disk Driver\n", 0 );
1272 if (IoRuns != StackIoRuns) {
1281 DebugTrace(-1,
Dbg,
"FatNonCachedIo -> STATUS_PENDING\n", 0);
1289 return Irp->IoStatus.Status;
1295FatNonCachedNonAlignedRead (
1337 ULONG NextByteCount;
1342 ULONG OriginalByteCount;
1343 ULONG OriginalStartingVbo;
1352 PVOID SavedUserBuffer;
1358 DebugTrace( 0,
Dbg,
"MajorFunction = %08lx\n", IrpContext->MajorFunction );
1418 FatLookupFileAllocation( IrpContext,
1434 if ( !NextIsAllocated ) {
1436 FatPopUpFileCorrupt( IrpContext,
FcbOrDcb );
1490 FatLookupFileAllocation( IrpContext,
1506 if ( !NextIsAllocated ) {
1508 FatPopUpFileCorrupt( IrpContext,
FcbOrDcb );
1531 UserBuffer += LastSectorVbo - OriginalStartingVbo;
1550 SavedMdl =
Irp->MdlAddress;
1553 SavedUserBuffer =
Irp->UserBuffer;
1566 Irp->MdlAddress = SavedMdl;
1567 Irp->UserBuffer = SavedUserBuffer;
1582 FatNonCachedIo( IrpContext,
1594 Irp->MdlAddress = SavedMdl;
1595 Irp->UserBuffer = SavedUserBuffer;
1606 Irp->IoStatus.Information = OriginalByteCount;
1616 DebugTrace(-1,
Dbg,
"FatNonCachedNonAlignedRead -> VOID\n", 0);
1691 ULONG UnwindRunCount = 0;
1698 DebugTrace( 0,
Dbg,
"MajorFunction = %08lx\n", IrpContext->MajorFunction );
1701 DebugTrace( 0,
Dbg,
"MultipleIrpCount = %08lx\n", MultipleIrpCount );
1720 Context = IrpContext->FatIoContext;
1726 Context->MasterIrp = MasterIrp;
1740 for ( UnwindRunCount = 0;
1741 UnwindRunCount < MultipleIrpCount;
1742 UnwindRunCount++ ) {
1749 IoRuns[UnwindRunCount].SavedIrp = 0;
1752 (
CCHAR)(
Vcb->TargetDeviceObject->StackSize + 1) );
1759 IoRuns[UnwindRunCount].SavedIrp =
Irp;
1766 IoRuns[UnwindRunCount].Offset,
1767 IoRuns[UnwindRunCount].ByteCount,
1785 (
PCHAR)MasterIrp->UserBuffer +
1786 IoRuns[UnwindRunCount].Offset,
1787 IoRuns[UnwindRunCount].ByteCount );
1858 ExceptionExpected =
FALSE;
1867 Context->IrpCount = MultipleIrpCount;
1868 MasterIrp->AssociatedIrp.IrpCount = MultipleIrpCount;
1872 MasterIrp->AssociatedIrp.IrpCount += 1;
1874 else if (
FlagOn(
Context->Wait.Async.ResourceThreadId, 3 )) {
1899 Context->IrpContextFlags = IrpContext->Flags;
1905 for (UnwindRunCount = 0;
1906 UnwindRunCount < MultipleIrpCount;
1909 Irp = IoRuns[UnwindRunCount].SavedIrp;
1920 Vcb->TargetDeviceObject,
1952 if (!ExceptionExpected) {
1955#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
1964 for (
i = 0;
i <= UnwindRunCount;
i++) {
1966 if ( (
Irp = IoRuns[
i].SavedIrp) !=
NULL ) {
1968 if (
Irp->MdlAddress !=
NULL ) {
2037 DebugTrace( 0,
Dbg,
"MajorFunction = %08lx\n", IrpContext->MajorFunction );
2061 IrpContext->FatIoContext,
2111 FlagOn( IrpContext->FatIoContext->Wait.Async.ResourceThreadId, 3 )) {
2113 Context = IrpContext->FatIoContext;
2132 IrpContext->FatIoContext->IrpContextFlags = IrpContext->Flags;
2147 Vcb->TargetDeviceObject,
2224 DebugTrace( 0,
Dbg,
"MajorFunction = %08lx\n", IrpContext->MajorFunction );
2236 SavedMdl =
Irp->MdlAddress;
2238 Irp->MdlAddress = 0;
2248 Irp->MdlAddress = SavedMdl;
2266 Irp->MdlAddress = SavedMdl;
2276 IrpContext->FatIoContext,
2334 Vcb->TargetDeviceObject,
2344 Irp->MdlAddress = SavedMdl;
2360 DebugTrace(-1,
Dbg,
"FatSingleNonAlignedSync -> VOID\n", 0);
2389 DebugTrace(+1,
Dbg,
"FatWaitSync, Context = %p\n", IrpContext->FatIoContext );
2394 KeClearEvent( &IrpContext->FatIoContext->Wait.SyncEvent );
2465 if(!(
NT_SUCCESS( FatBreakOnInterestingIoCompletion ) ||
Irp->IoStatus.Status != FatBreakOnInterestingIoCompletion )) {
2470#ifdef SYSCACHE_COMPILE
2471 DbgPrint(
"FAT SYSCACHE: MultiSync (IRP %08x for Master %08x) -> %08x\n",
Irp, MasterIrp,
Irp->
IoStatus );
2493 DebugTrace(-1,
Dbg,
"FatMultiSyncCompletionRoutine -> SUCCESS\n", 0 );
2567 if (!(
NT_SUCCESS( FatBreakOnInterestingIoCompletion ) ||
Irp->IoStatus.Status != FatBreakOnInterestingIoCompletion )) {
2572#ifdef SYSCACHE_COMPILE
2573 DbgPrint(
"FAT SYSCACHE: MultiAsync (IRP %08x for Master %08x) -> %08x\n",
Irp, MasterIrp,
Irp->
IoStatus );
2589 Context->Wait.Async.RequestedByteCount;
2627 if ((
Context->Wait.Async.NonPagedFcb) &&
2642 Context->Wait.Async.ResourceThreadId );
2648 Context->Wait.Async.ResourceThreadId );
2686 DebugTrace(-1,
Dbg,
"FatMultiAsyncCompletionRoutine -> SUCCESS\n", 0 );
2783#pragma prefast( suppress:28159, "prefast indicates this is obsolete, but it is ok for fastfat to use it" )
2873 DebugTrace(-1,
Dbg,
"FatPagingFileCompletionRoutine => (done)\n", 0 );
2936 DebugTrace(+1,
Dbg,
"FatPagingFileCompletionRoutine, MasterIrp = %p\n", MasterIrp );
2948 if (
Irp != MasterIrp) {
2950 ((
PIRP)MasterIrp)->IoStatus =
Irp->IoStatus;
2953 DebugTrace(-1,
Dbg,
"FatPagingFileCompletionRoutine => (done)\n", 0 );
3014 DebugTrace(+1,
Dbg,
"FatSpecialSyncCompletionRoutine, Context = %p\n", Contxt );
3016 SyncContext->
Iosb =
Irp->IoStatus;
3020 DebugTrace(-1,
Dbg,
"FatSpecialSyncCompletionRoutine -> STATUS_SUCCESS\n", 0 );
3081 if(!(
NT_SUCCESS( FatBreakOnInterestingIoCompletion ) ||
Irp->IoStatus.Status != FatBreakOnInterestingIoCompletion )) {
3092 DebugTrace(-1,
Dbg,
"FatSingleSyncCompletionRoutine -> STATUS_MORE_PROCESSING_REQUIRED\n", 0 );
3160 Irp->IoStatus.Information =
Context->Wait.Async.RequestedByteCount;
3177 if(!(
NT_SUCCESS( FatBreakOnInterestingIoCompletion ) ||
Irp->IoStatus.Status != FatBreakOnInterestingIoCompletion )) {
3182#ifdef SYSCACHE_COMPILE
3183 DbgPrint(
"FAT SYSCACHE: SingleAsync (IRP %08x) -> %08x\n",
Irp,
Irp->IoStatus );
3208 if ((
Context->Wait.Async.NonPagedFcb) &&
3223 Context->Wait.Async.ResourceThreadId );
3229 Context->Wait.Async.ResourceThreadId );
3267 DebugTrace(-1,
Dbg,
"FatSingleAsyncCompletionRoutine -> STATUS_MORE_PROCESSING_REQUIRED\n", 0 );
3314 if (
Irp->MdlAddress ==
NULL) {
3392 if (
Irp->MdlAddress ==
NULL) {
3394 return Irp->UserBuffer;
3459 if (
Irp->AssociatedIrp.SystemBuffer ==
NULL) {
3490 return Irp->AssociatedIrp.SystemBuffer;
3537 if ((PreventRemoval ^
3563#pragma warning(suppress: 6387)
3566 Vcb->TargetDeviceObject,
3591 Irp->UserIosb = &
Irp->IoStatus;
3706 if (OverrideVerify) {
3759 ULONG SavedByteCount;
3795 if (ZeroMdl ==
NULL) {
3820 SavedByteCount = ZeroMdl->ByteCount;
3824 ZeroMdl->MdlFlags &= ~MDL_SOURCE_IS_NONPAGED_POOL;
3826 ZeroMdl->MappedSystemVa =
NULL;
3827 ZeroMdl->StartVa =
NULL;
3828 ZeroMdl->ByteCount = SavedByteCount;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedDecrement
PEPROCESS __stdcall PsGetThreadProcess(_In_ PETHREAD Thread)
#define IOCTL_DISK_MEDIA_REMOVAL
#define IRP_CONTEXT_FLAG_WAIT
VOLUME_DEVICE_OBJECT * PVOLUME_DEVICE_OBJECT
#define _Requires_lock_held_(lock)
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION IrpSp
#define TAG_IO_USER_BUFFER
#define FatBugCheck(A, B, C)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define ExReleaseResourceForThreadLite(res, thrdID)
#define PsGetCurrentThread()
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeReleaseSpinLock(sl, irql)
#define KeSetEvent(pEvt, foo, foo2)
#define KeAcquireSpinLock(sl, irql)
#define KeDelayExecutionThread(mode, foo, t)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
#define ClearFlag(_F, _SF)
#define IRP_CONTEXT_FLAG_USER_IO
#define IRP_CONTEXT_FLAG_WRITE_THROUGH
#define BooleanFlagOn(F, SF)
#define FatLowLevelReadWrite(IRPCONTEXT, DO, IRP, VCB)
NTSTATUS FatToggleMediaEjectDisable(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN BOOLEAN PreventRemoval)
struct FAT_PAGING_FILE_CONTEXT * PFAT_PAGING_FILE_CONTEXT
PVOID FatBufferUserBuffer(IN PIRP_CONTEXT IrpContext, IN OUT PIRP Irp, IN ULONG BufferLength)
NTSTATUS FatPerformDevIoCtrl(IN PIRP_CONTEXT IrpContext, IN ULONG IoControlCode, IN PDEVICE_OBJECT Device, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferLength, OUT PVOID OutputBuffer OPTIONAL, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN BOOLEAN OverrideVerify, OUT PIO_STATUS_BLOCK Iosb OPTIONAL)
VOID FatUpdateDiskStats(IN PIRP_CONTEXT IrpContext, IN PIRP Irp, IN ULONG ByteCount)
PVOID FatMapUserBuffer(IN PIRP_CONTEXT IrpContext, IN OUT PIRP Irp)
#define FatDoCompletionZero(I, C)
VOID FatSingleNonAlignedSync(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PUCHAR Buffer, IN LBO Lbo, IN ULONG ByteCount, IN PIRP Irp)
VOID FatMultipleAsync(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PIRP MasterIrp, IN ULONG MultipleIrpCount, IN PIO_RUN IoRuns)
IO_COMPLETION_ROUTINE FatSpecialSyncCompletionRoutine
NTSTATUS FatPagingFileErrorHandler(IN PIRP Irp, IN PKEVENT Event OPTIONAL)
IO_COMPLETION_ROUTINE FatPagingFileCompletionRoutineCatch
PMDL FatBuildZeroMdl(__in PIRP_CONTEXT IrpContext, __in ULONG Length)
VOID FatWaitSync(IN PIRP_CONTEXT IrpContext)
VOID FatSingleAsync(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN LBO Lbo, IN ULONG ByteCount, IN PIRP Irp)
struct _FAT_SYNC_CONTEXT * PFAT_SYNC_CONTEXT
IO_COMPLETION_ROUTINE FatSingleAsyncCompletionRoutine
VOID FatLockUserBuffer(IN PIRP_CONTEXT IrpContext, IN OUT PIRP Irp, IN LOCK_OPERATION Operation, IN ULONG BufferLength)
IO_COMPLETION_ROUTINE FatPagingFileCompletionRoutine
#define CollectDiskIoStats(VCB, FUNCTION, IS_USER_IO, COUNT)
IO_COMPLETION_ROUTINE FatMultiSyncCompletionRoutine
struct _FAT_SYNC_CONTEXT FAT_SYNC_CONTEXT
VOID FatPagingFileIo(IN PIRP Irp, IN PFCB Fcb)
IO_COMPLETION_ROUTINE FatMultiAsyncCompletionRoutine
#define FatUpdateIOCountersPCW(IsAWrite, Count)
IO_COMPLETION_ROUTINE FatSingleSyncCompletionRoutine
LARGE_INTEGER Fat30Milliseconds
LOGICAL FatDiskAccountingEnabled
ULONG FatExceptionFilter(IN PIRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
#define FAT_RESERVE_MDL_SIZE
#define FAT_MAX_IO_RUNS_ON_STACK
#define DebugTrace(INDENT, LEVEL, X, Y)
#define BlockAlignTruncate(P, V)
IN PVCB IN VBO StartingVbo
WORKER_THREAD_ROUTINE FatFspMarkVolumeDirtyWithRecover
NTSTATUS FatFsdPostRequest(IN PIRP_CONTEXT IrpContext, IN PIRP Irp)
BOOLEAN FatLookupMcbEntry(IN PVCB Vcb, IN PLARGE_MCB Mcb, IN VBO Vbo, OUT PLBO Lbo, OUT PULONG ByteCount OPTIONAL, OUT PULONG Index OPTIONAL)
IN PFCB IN VBO OUT PLBO Lbo
IN PIRP IN PFCB IN ULONG IN ULONG IN ULONG UserByteCount
BOOLEAN FatGetNextMcbEntry(IN PVCB Vcb, IN PLARGE_MCB Mcb, IN ULONG RunIndex, OUT PVBO Vbo, OUT PLBO Lbo, OUT PULONG ByteCount)
IN PIRP IN PFCB IN ULONG IN ULONG IN ULONG IN ULONG StreamFlags
IN PFCB IN VBO OUT PLBO OUT PULONG OUT PBOOLEAN OUT PBOOLEAN EndOnMax
#define FatRaiseStatus(IRPCONTEXT, STATUS)
PIRP_CONTEXT FatCreateIrpContext(IN PIRP Irp, IN BOOLEAN Wait)
#define IRP_CONTEXT_FLAG_RECURSIVE_CALL
#define IRP_CONTEXT_FLAG_OVERRIDE_VERIFY
#define FCB_STATE_PAGING_FILE
#define VCB_STATE_FLAG_REMOVAL_PREVENTED
#define FSRTL_MOD_WRITE_TOP_LEVEL_IRP
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define KeGetCurrentThread
#define EXCEPTION_EXECUTE_HANDLER
NTSYSAPI void WINAPI DbgBreakPoint(void)
ULONG NTAPI ExInterlockedAddUlong(IN OUT PULONG Addend, IN ULONG Increment, IN OUT PKSPIN_LOCK Lock)
VOID NTAPI IoBuildPartialMdl(IN PMDL SourceMdl, IN PMDL TargetMdl, IN PVOID VirtualAddress, IN ULONG Length)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
VOID NTAPI MmUnlockPages(IN PMDL Mdl)
VOID NTAPI MmBuildMdlForNonPagedPool(IN PMDL Mdl)
#define _In_reads_opt_(size)
#define _Analysis_assume_(expr)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
_In_ UINT _In_ UINT BytesToCopy
#define UNREFERENCED_PARAMETER(P)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define ARGUMENT_PRESENT(ArgumentPointer)
VOID NTAPI ExSetResourceOwnerPointer(IN PERESOURCE Resource, IN PVOID OwnerPointer)
BOOLEAN NTAPI FsRtlIsTotalDeviceFailure(IN NTSTATUS NtStatus)
PVOID NTAPI FsRtlAllocatePoolWithTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
BOOLEAN NTAPI FsRtlIsNtstatusExpected(IN NTSTATUS NtStatus)
PVOID NTAPI FsRtlAllocatePoolWithQuotaTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
#define IoCompleteRequest
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)
PIRP NTAPI IoGetTopLevelIrp(VOID)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
PIRP NTAPI IoMakeAssociatedIrp(IN PIRP Irp, IN CCHAR StackSize)
BOOLEAN NTAPI IoIsSystemThread(IN PETHREAD Thread)
#define _SEH2_AbnormalTermination()
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
#define STATUS_MORE_PROCESSING_REQUIRED
PULONG MinorVersion OPTIONAL
KSPIN_LOCK GeneralSpinLock
ULONG NonCachedDiskWrites
ULONG NonCachedWriteBytes
PDEVICE_OBJECT DeviceObject
struct _IO_STACK_LOCATION::@3974::@3978 Read
union _IO_STACK_LOCATION::@1575 Parameters
struct _FILE_SYSTEM_STATISTICS * Statistics
PDEVICE_OBJECT TargetDeviceObject
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_USER_BUFFER
#define STATUS_VERIFY_REQUIRED
#define STATUS_FILE_CORRUPT_ERROR
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE Device
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_In_ WDFDPC _In_ BOOLEAN Wait
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
VOID NTAPI ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem, IN WORK_QUEUE_TYPE QueueType)
_Must_inspect_result_ _In_ ULONG Flags
#define ExInitializeWorkItem(Item, Routine, Context)
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
FORCEINLINE VOID IoSetNextIrpStackLocation(_Inout_ PIRP Irp)
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG _In_ BOOLEAN InternalDeviceIoControl
#define SL_OVERRIDE_VERIFY_VOLUME
#define IRP_DEALLOCATE_BUFFER
#define FO_FILE_FAST_IO_READ
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
#define IO_DISK_INCREMENT
enum _LOCK_OPERATION LOCK_OPERATION
#define ROUND_TO_PAGES(Size)
#define MmGetMdlVirtualAddress(_Mdl)
#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority)
#define MmPrepareMdlForReuse(_Mdl)
#define MmGetMdlPfnArray(_Mdl)
#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, _Size)