23#define BugCheckFileId (FAT_BUG_CHECK_WRITE)
29#define Dbg (DEBUG_TRACE_WRITE)
35#define CollectWriteStats(VCB,OPEN_TYPE,BYTE_COUNT) { \
36 PFILESYSTEM_STATISTICS Stats = &(VCB)->Statistics[KeGetCurrentProcessorNumber() % FatData.NumberProcessors].Common; \
37 if (((OPEN_TYPE) == UserFileOpen)) { \
38 Stats->UserFileWrites += 1; \
39 Stats->UserFileWriteBytes += (ULONG)(BYTE_COUNT); \
40 } else if (((OPEN_TYPE) == VirtualVolumeFile || ((OPEN_TYPE) == DirectoryFile))) { \
41 Stats->MetaDataWrites += 1; \
42 Stats->MetaDataWriteBytes += (ULONG)(BYTE_COUNT); \
72#pragma alloc_text(PAGE, FatDeferredFlush)
73#pragma alloc_text(PAGE, FatCommonWrite)
183 Status = FatCommonWrite( IrpContext,
Irp );
257 ULONG InitialFileSize = 0;
258 ULONG InitialValidDataLength = 0;
339 Irp->IoStatus.Information = 0;
430 Irp->IoStatus.Information = 0;
445 if (IrpContext->FatIoContext ==
NULL) {
449 IrpContext->FatIoContext =
456 IrpContext->FatIoContext = &StackFatIoContext;
474 IrpContext->FatIoContext->Wait.Async.ResourceThreadId =
479 IrpContext->FatIoContext->Wait.Async.ResourceThreadId =
480 ((
ULONG_PTR)IrpContext->FatIoContext) | 3;
483 IrpContext->FatIoContext->Wait.Async.RequestedByteCount =
486 IrpContext->FatIoContext->Wait.Async.FileObject =
FileObject;
498 Irp->IoStatus.Information = 0;
528 VBO StartingDirtyVbo;
530 ULONG DirtyByteCount;
531 ULONG CleanByteCount;
539 DebugTrace(0,
Dbg,
"Type of write is Virtual Volume File\n", 0);
592 || ( (DirtyLbo == 0) && (DirtyByteCount >=
ByteCount) ) ) {
595 "No dirty fat sectors in the write range.\n", 0);
601 DirtyVbo = (
VBO)DirtyLbo;
617 StartingDirtyVbo = DirtyVbo;
625 while ( MoreDirtyRuns ) {
639#pragma prefast( suppress:28931, "needed for debug build" )
641 DirtyVbo = (
VBO)DirtyLbo;
643 DebugTrace(0,
Dbg,
"Last dirty fat Mcb entry was a hole: corrupt.\n", 0);
646#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
652 DirtyVbo = (
VBO)DirtyLbo;
688 MoreDirtyRuns =
FALSE;
698 DirtyVbo + DirtyByteCount,
703 MoreDirtyRuns =
FALSE;
720 if (DirtyVbo + DirtyByteCount + CleanByteCount >=
723 MoreDirtyRuns =
FALSE;
731 DirtyVbo += DirtyByteCount + CleanByteCount;
745 WriteLength = (DirtyVbo + DirtyByteCount) - StartingDirtyVbo;
778 IoRuns = StackIoRuns;
781 for (Fat = 0; Fat < (
ULONG)
Vcb->Bpb.Fats; Fat++) {
783 IoRuns[Fat].Vbo = StartingDirtyVbo;
784 IoRuns[Fat].Lbo = Fat * BytesPerFat + StartingDirtyVbo;
785 IoRuns[Fat].Offset = StartingDirtyVbo -
StartingVbo;
805 if (IoRuns != StackIoRuns) {
811#if (NTDDI_VERSION >= NTDDI_WIN8)
844 "Error %X while writing volume file.\n",
845 Irp->IoStatus.Status );
847 RaiseIosb =
Irp->IoStatus;
861 Irp->IoStatus = RaiseIosb;
896 (
Vcb->Bpb.Sectors != 0 ?
Vcb->Bpb.Sectors :
897 Vcb->Bpb.LargeSectors));
899 StartingLbo = StartingByte.
QuadPart;
921 if (!WriteToEof && (StartingLbo < VolumeSize)) {
991 FatPurgeReferencedFileObjects( IrpContext,
Vcb->RootDcb,
Flush );
1013 if (WriteToEof || StartingLbo >= VolumeSize) {
1018 if (
ByteCount > VolumeSize - StartingLbo) {
1029 IrpContext->FatIoContext->Wait.Async.RequestedByteCount =
1042 StartingLbo = VolumeSize;
1071#if (NTDDI_VERSION >= NTDDI_WIN8)
1097 IrpContext->FatIoContext =
NULL;
1101 DebugTrace(-1,
Dbg,
"FatNonCachedIo -> STATUS_PENDING\n", 0);
1125 if (SynchronousIo && !PagingIo) {
1127 StartingLbo +
Irp->IoStatus.Information;
1155 ULONG ValidDataLength;
1156 ULONG ValidDataToDisk;
1157 ULONG ValidDataToCheck;
1171 if (NonCachedIo && !PagingIo &&
1180 if (!FatAcquireExclusiveFcb( IrpContext,
FcbOrDcb )) {
1187 FcbOrDcbAcquired =
TRUE;
1188 FcbAcquiredExclusive =
TRUE;
1196#if (NTDDI_VERSION >= NTDDI_WIN7)
1202 PagingIoResourceAcquired =
TRUE;
1243 PagingIoResourceAcquired =
TRUE;
1294 FcbCanDemoteToShared =
TRUE;
1311 PagingIoResourceAcquired =
TRUE;
1315 IrpContext->FatIoContext->Wait.Async.Resource =
1351 if (!
Wait && NonCachedIo) {
1353 if (!FcbOrDcbAcquired &&
1366 IrpContext->FatIoContext->Wait.Async.Resource =
FcbOrDcb->
Header.Resource;
1368 if (FcbCanDemoteToShared) {
1370 IrpContext->FatIoContext->Wait.Async.Resource2 =
FcbOrDcb->
Header.PagingIoResource;
1374 if (!FcbOrDcbAcquired &&
1375 !FatAcquireSharedFcb( IrpContext,
FcbOrDcb )) {
1382 FcbOrDcbAcquired =
TRUE;
1419 Irp->IoStatus.Information = 0;
1426 DebugTrace( 0,
Dbg,
"PagingIo extending beyond EOF.\n", 0 );
1439 CalledByLazyWriter =
TRUE;
1505 RecursiveWriteThrough =
TRUE;
1543 if ( !CalledByLazyWriter &&
1545 !RecursiveWriteThrough &&
1570 SwitchBackToAsync =
TRUE;
1603 PagingIoResourceAcquired =
FALSE;
1612 if (!FcbAcquiredExclusive) {
1615 FcbOrDcbAcquired =
FALSE;
1617 if (!FatAcquireExclusiveFcb( IrpContext,
FcbOrDcb )) {
1624 FcbOrDcbAcquired =
TRUE;
1627#pragma prefast( suppress:28931, "convenient for debugging" )
1629 FcbAcquiredExclusive =
TRUE;
1642 if (SwitchBackToAsync) {
1654 SwitchBackToAsync =
FALSE;
1681 UnwindOutstandingAsync =
TRUE;
1705 Irp->IoStatus.Information = 0;
1721 if (NonCachedIo && !
Wait) {
1723 IrpContext->FatIoContext->Wait.Async.RequestedByteCount =
1734 InitialValidDataLength = ValidDataLength;
1740 FatVerifyFcb( IrpContext,
FcbOrDcb );
1761 Irp->IoStatus.Information = 0;
1787 OplockPostIrp =
TRUE;
1822 ExtendingFile =
TRUE;
1825 if ( ExtendingFile ) {
1851 FatLookupFileAllocationSize( IrpContext,
FcbOrDcb );
1876 ULONG BytesPerCluster;
1877 ULONG ClusterAlignedFileSize;
1915 BytesPerCluster = 1 <<
Vcb->AllocationSupport.LogOfBytesPerCluster;
1924 ClusterAlignedFileSize = ((
FileSize) + (BytesPerCluster - 1)) &
1925 ~(BytesPerCluster - 1);
1928 if (ClusterAlignedFileSize != 0) {
1941 Multiplier = ((
Vcb->AllocationSupport.NumberOfFreeClusters *
1942 (BytesPerCluster >> 5)) /
1943 (ClusterAlignedFileSize -
1946 if (Multiplier > 32) { Multiplier = 32; }
1950 AddedAllocation = Multiplier * (ClusterAlignedFileSize -
FcbOrDcb->
Header.AllocationSize.LowPart);
1952 TargetAllocation =
FcbOrDcb->
Header.AllocationSize.LowPart + AddedAllocation;
1960 if (TargetAllocation > ~BytesPerCluster + 1) {
1962 TargetAllocation = ~BytesPerCluster + 1;
1963 AddedAllocation = TargetAllocation -
FcbOrDcb->
Header.AllocationSize.LowPart;
1973 ApproximateClusterCount = (AddedAllocation / BytesPerCluster);
1975 if (ApproximateClusterCount <= Vcb->AllocationSupport.NumberOfFreeClusters) {
1979 FatAddFileAllocation( IrpContext,
1982 (
ULONG)TargetAllocation );
1984 AllocateMinimumSize =
FALSE;
1996 if ( AllocateMinimumSize ) {
1999 FatAddFileAllocation( IrpContext,
2041 if ( !CalledByLazyWriter &&
2042 !RecursiveWriteThrough &&
2045 ExtendingValidData =
TRUE;
2062 if (FcbCanDemoteToShared) {
2066 FcbAcquiredExclusive =
FALSE;
2070 if (ValidDataToDisk > ValidDataLength) {
2072 ValidDataToCheck = ValidDataToDisk;
2076 ValidDataToCheck = ValidDataLength;
2085 if ( NonCachedIo ) {
2121 DebugTrace( 0,
Dbg,
"FatCommonWrite -> STATUS_NOT_IMPLEMENTED\n", 0);
2144 if (!CalledByLazyWriter &&
2145 !RecursiveWriteThrough &&
2161 WriteFileSizeToDirent =
TRUE;
2167 if (SwitchBackToAsync) {
2173#ifdef SYSCACHE_COMPILE
2175#define MY_SIZE 0x1000000
2176#define LONGMAP_COUNTER
2186 if (
NULL == WriteMask) {
2201 if (Off +
Len > MY_SIZE) {
2202 Len = MY_SIZE - Off;
2219#ifdef LONGMAP_COUNTER
2246 if (Off +
Len > MY_SIZE) {
2247 Len = MY_SIZE - Off;
2266 if (FatNonCachedIo( IrpContext,
2275 UnwindOutstandingAsync =
FALSE;
2278#pragma prefast( suppress:28931, "convenient for debugging" )
2283 IrpContext->FatIoContext =
NULL;
2308 ULONG NewValidDataToDisk;
2315 NT_ASSERT(
Irp->IoStatus.Information == BytesToWrite );
2325 if (NewValidDataToDisk >
FileSize) {
2369 FatLookupFileAllocationSize( IrpContext,
FcbOrDcb );
2374 FatPopUpFileCorrupt( IrpContext,
FcbOrDcb );
2442 &FlushContext->
Dpc );
2464 DebugTrace( 0,
Dbg,
"Cached Write could not wait to zero\n", 0 );
2492#if (NTDDI_VERSION >= NTDDI_WIN8)
2498 Irp->Tail.Overlay.Thread )) {
2562 FatVerifyFcb( IrpContext,
FcbOrDcb );
2577 PagingIoResourceAcquired =
TRUE;
2581 IrpContext->FatIoContext->Wait.Async.Resource =
2617#pragma prefast( suppress:28931, "needed for debug build" )
2638 DebugTrace( 0,
Dbg,
"PagingIo dirent started beyond EOF.\n", 0 );
2640 Irp->IoStatus.Information = 0;
2647 DebugTrace( 0,
Dbg,
"PagingIo dirent extending beyond EOF.\n", 0 );
2656 if (FatNonCachedIo( IrpContext,
2664 IrpContext->FatIoContext =
NULL;
2694 DebugTrace( 0,
Dbg,
"FatCommonWrite -> STATUS_INVALID_PARAMETER\n", 0);
2706#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
2722 ULONG ActualBytesWrote;
2724 DebugTrace( 0,
Dbg,
"Completing request with status = %08lx\n",
2728 Irp->IoStatus.Information);
2734 ActualBytesWrote = (
ULONG)
Irp->IoStatus.Information;
2741 if (SynchronousIo && !PagingIo) {
2771 if ( ExtendingFile && WriteFileSizeToDirent ) {
2788 if ( ExtendingFile && !WriteFileSizeToDirent ) {
2793 if ( ExtendingValidData ) {
2801 if (
FileSize < EndingVboWritten ) {
2841 if (!OplockPostIrp) {
2845 if ( ExtendingFile ) {
2889 if (ExtendingFile || ExtendingValidData) {
2896 FcbOrDcb->
Header.ValidDataLength.LowPart = InitialValidDataLength;
2915 if (UnwindOutstandingAsync) {
2926 if (FcbOrDcbAcquired &&
Irp) {
2931 if (PagingIoResourceAcquired &&
Irp) {
3004#pragma prefast( suppress:28159, "prefast indicates this API is obsolete, but it's ok for fastfat to keep using it" )
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
#define InterlockedExchange
#define READ_AHEAD_GRANULARITY
PEPROCESS __stdcall PsGetThreadProcess(_In_ PETHREAD Thread)
VOID NTAPI CcPrepareMdlWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, OUT PMDL *MdlChain, OUT PIO_STATUS_BLOCK IoStatus)
VOID NTAPI CcSetReadAheadGranularity(IN PFILE_OBJECT FileObject, IN ULONG Granularity)
VOID NTAPI CcFlushCache(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, OUT OPTIONAL PIO_STATUS_BLOCK IoStatus)
NTKERNELAPI VOID NTAPI CcCoherencyFlushAndPurgeCache(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _Out_ PIO_STATUS_BLOCK IoStatus, _In_opt_ ULONG Flags)
#define CcGetFileSizePointer(FO)
#define CcIsFileCached(FO)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN TypeOfOpen
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
enum _TYPE_OF_OPEN TYPE_OF_OPEN
#define CCB_FLAG_ALLOW_EXTENDED_DASD_IO
#define IRP_CONTEXT_FLAG_IN_FSP
#define IRP_CONTEXT_FLAG_WAIT
#define _Requires_lock_held_(lock)
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
_In_ PIO_STACK_LOCATION IrpSp
#define FatReservedBytes(B)
#define FatBytesPerFat(B)
#define TAG_DEFERRED_FLUSH_CONTEXT
#define TAG_FAT_IO_CONTEXT
#define FatBugCheck(A, B, C)
KDEFERRED_ROUTINE FatDeferredFlushDpc
#define CollectWriteStats(VCB, OPEN_TYPE, BYTE_COUNT)
WORKER_THREAD_ROUTINE FatDeferredFlush
#define PsGetCurrentThread()
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define ExGetCurrentResourceThread()
#define ExConvertExclusiveToSharedLite(res)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExAcquireResourceSharedLite(res, wait)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
#define ClearFlag(_F, _SF)
#define IRP_CONTEXT_FLAG_USER_IO
#define FILE_WRITE_TO_END_OF_FILE
#define IRP_CONTEXT_FLAG_WRITE_THROUGH
#define IRP_CONTEXT_STACK_IO_CONTEXT
#define BooleanFlagOn(F, SF)
VOID FatUnpinRepinnedBcbs(IN PIRP_CONTEXT IrpContext)
VOID FatInitializeCacheMap(_In_ PFILE_OBJECT FileObject, _In_ PCC_FILE_SIZES FileSizes, _In_ BOOLEAN PinAccess, _In_ PCACHE_MANAGER_CALLBACKS Callbacks, _In_ PVOID LazyWriteContext)
FINISHED FatZeroData(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PFILE_OBJECT FileObject, IN ULONG StartingZero, IN ULONG ByteCount)
NTSTATUS FatCompleteMdl(IN PIRP_CONTEXT IrpContext, IN PIRP Irp)
PVOID FatMapUserBuffer(IN PIRP_CONTEXT IrpContext, IN OUT PIRP Irp)
VOID FatMultipleAsync(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PIRP MasterIrp, IN ULONG MultipleIrpCount, IN PIO_RUN IoRuns)
VOID FatWaitSync(IN PIRP_CONTEXT IrpContext)
VOID FatSingleAsync(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN LBO Lbo, IN ULONG ByteCount, IN PIRP Irp)
VOID FatLockUserBuffer(IN PIRP_CONTEXT IrpContext, IN OUT PIRP Irp, IN LOCK_OPERATION Operation, IN ULONG BufferLength)
VOID FatPagingFileIo(IN PIRP Irp, IN PFCB Fcb)
LOGICAL FatDiskAccountingEnabled
ULONG FatExceptionFilter(IN PIRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
BOOLEAN FatIsIrpTopLevel(IN PIRP Irp)
#define DebugDump(STR, LEVEL, PTR)
#define DebugTrace(INDENT, LEVEL, X, Y)
VOID FatQuickVerifyVcb(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb)
#define FatDeleteIrpContext(IRPCONTEXT)
IN PVCB IN VBO StartingVbo
NTSTATUS FatFsdPostRequest(IN PIRP_CONTEXT IrpContext, IN PIRP Irp)
#define FatAcquireExclusiveVolume(IRPCONTEXT, VCB)
TYPE_OF_OPEN FatDecodeFileObject(_In_ PFILE_OBJECT FileObject, _Outptr_ PVCB *Vcb, _Outptr_ PFCB *FcbOrDcb, _Outptr_ PCCB *Ccb)
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 PCCB IN TYPE_OF_OPEN IN BOOLEAN IN BOOLEAN TopLevel
#define FatReleaseVolume(IRPCONTEXT, VCB)
#define FatCompleteRequest(IRPCONTEXT, IRP, STATUS)
#define FatNotifyReportChange(I, V, F, FL, A)
#define FatReleaseFcb(IRPCONTEXT, Fcb)
NTSTATUS FatFlushFat(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb)
VOID NTAPI FatPrePostIrp(IN PVOID Context, IN PIRP Irp)
#define FatDeviceIsFatFsdo(D)
#define FatResetExceptionState(IRPCONTEXT)
VOID FatRemoveMcbEntry(IN PVCB Vcb, IN PLARGE_MCB Mcb, IN VBO Vbo, IN ULONG SectorCount)
#define FatIsFastIoPossible(FCB)
VOID NTAPI FatOplockComplete(IN PVOID Context, IN PIRP Irp)
#define FatNormalizeAndRaiseStatus(IRPCONTEXT, STATUS)
#define FatRaiseStatus(IRPCONTEXT, STATUS)
_Acquires_shared_lock_ Fcb FINISHED FatAcquireSharedFcbWaitForEx(IN PIRP_CONTEXT IrpContext, IN PFCB Fcb)
#define FatGetFcbOplock(F)
VOID FatAddToWorkque(IN PIRP_CONTEXT IrpContext, IN PIRP Irp)
PIRP_CONTEXT FatCreateIrpContext(IN PIRP Irp, IN BOOLEAN Wait)
static INLINE BOOLEAN FatIsIoRangeValid(IN PVCB Vcb, IN LARGE_INTEGER Start, IN ULONG Length)
#define IRP_CONTEXT_FLAG_RECURSIVE_CALL
#define VCB_STATE_FLAG_LOCKED
#define VCB_STATE_FLAG_SHUTDOWN
#define IRP_CONTEXT_FLAG_DEFERRED_WRITE
DEFERRED_FLUSH_CONTEXT * PDEFERRED_FLUSH_CONTEXT
#define VCB_STATE_FLAG_DEFERRED_FLUSH
#define IRP_CONTEXT_FLAG_OVERRIDE_VERIFY
#define FCB_LOOKUP_ALLOCATIONSIZE_HINT
#define FCB_STATE_TRUNCATE_ON_CLOSE
#define FCB_STATE_PAGING_FILE
#define CCB_FLAG_DASD_FLUSH_DONE
#define CCB_FLAG_SENT_FORMAT_UNIT
#define IRP_CONTEXT_FLAG_DISABLE_WRITE_THROUGH
#define CCB_FLAG_DASD_PURGE_DONE
#define CCB_FLAG_COMPLETE_DISMOUNT
BOOLEAN NTAPI FsRtlCheckLockForWriteAccess(IN PFILE_LOCK FileLock, IN PIRP Irp)
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
#define FSRTL_FSP_TOP_LEVEL_IRP
#define FSRTL_CACHE_TOP_LEVEL_IRP
#define FSRTL_FLAG_USER_MAPPED_FILE
#define FSRTL_MAX_TOP_LEVEL_IRP_FLAG
#define FSRTL_MOD_WRITE_TOP_LEVEL_IRP
VOID NTAPI CcSetFileSizes(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes)
BOOLEAN NTAPI CcPurgeCacheSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN UninitializeCacheMaps)
#define EXCEPTION_EXECUTE_HANDLER
#define EXCEPTION_CONTINUE_SEARCH
ULONG NTAPI ExInterlockedAddUlong(IN OUT PULONG Addend, IN ULONG Increment, IN OUT PKSPIN_LOCK Lock)
ULONG NTAPI FsRtlNumberOfRunsInLargeMcb(IN PLARGE_MCB Mcb)
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
DRIVER_DISPATCH(nfs41_FsdDispatch)
#define _Function_class_(n)
#define Int32x32To64(a, b)
#define UNREFERENCED_PARAMETER(P)
BOOLEAN NTAPI CcCopyWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN PVOID Buffer)
BOOLEAN NTAPI CcCanIWrite(IN PFILE_OBJECT FileObject, IN ULONG BytesToWrite, IN BOOLEAN Wait, IN UCHAR Retrying)
VOID NTAPI CcDeferWrite(IN PFILE_OBJECT FileObject, IN PCC_POST_DEFERRED_WRITE PostRoutine, IN PVOID Context1, IN PVOID Context2, IN ULONG BytesToWrite, IN BOOLEAN Retrying)
BOOLEAN NTAPI ExAcquireSharedStarveExclusive(IN PERESOURCE Resource, IN BOOLEAN Wait)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
BOOLEAN NTAPI ExIsResourceAcquiredExclusiveLite(IN PERESOURCE Resource)
PVOID NTAPI FsRtlAllocatePoolWithTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
PIRP NTAPI IoGetTopLevelIrp(VOID)
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
#define STATUS_PURGE_FAILED
#define STATUS_FILE_LOCK_CONFLICT
NTSTATUS NTAPI FsRtlCheckOplock(IN POPLOCK Oplock, IN PIRP Irp, IN PVOID Context, IN POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine OPTIONAL, IN POPLOCK_FS_PREPOST_IRP PostIrpRoutine OPTIONAL)
#define _SEH2_AbnormalTermination()
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
KSPIN_LOCK GeneralSpinLock
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
struct _FCB::@730::@733 Fcb
union _FCB::@730 Specific
FSRTL_ADVANCED_FCB_HEADER Header
CLONG PurgeFailureModeEnableCount
struct _IO_STACK_LOCATION::@3979::@3984 Write
union _IO_STACK_LOCATION::@1580 Parameters
PKEVENT OutstandingAsyncEvent
ULONG OutstandingAsyncWrites
SECTION_OBJECT_POINTERS SectionObjectPointers
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
#define RtlZeroMemory(Destination, Length)
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_FILE_CORRUPT_ERROR
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
_In_ WDFDPC _In_ BOOLEAN Wait
VOID NTAPI ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem, IN WORK_QUEUE_TYPE QueueType)
VOID(NTAPI * PCC_POST_DEFERRED_WRITE)(_In_ PVOID Context1, _In_ PVOID Context2)
#define ExInitializeWorkItem(Item, Routine, Context)
#define FILE_NOTIFY_CHANGE_SIZE
#define FILE_ACTION_MODIFIED
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
#define SL_FORCE_DIRECT_WRITE
#define FO_FILE_SIZE_CHANGED
#define FO_SYNCHRONOUS_IO
#define IRP_SYNCHRONOUS_PAGING_IO
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID DeferredContext
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
#define ObDereferenceObject
#define ObReferenceObject
_Inout_opt_ PVOID Parameter