23#define BugCheckFileId (FAT_BUG_CHECK_FILEINFO)
29#define Dbg (DEBUG_TRACE_FILEINFO)
113FatSetDispositionInfo (
138FatSetAllocationInfo (
157FatSetValidDataLengthInfo (
175#pragma alloc_text(PAGE, FatCommonQueryInformation)
176#pragma alloc_text(PAGE, FatCommonSetInformation)
177#pragma alloc_text(PAGE, FatFsdQueryInformation)
178#pragma alloc_text(PAGE, FatFsdSetInformation)
179#pragma alloc_text(PAGE, FatQueryBasicInfo)
180#pragma alloc_text(PAGE, FatQueryEaInfo)
181#pragma alloc_text(PAGE, FatQueryInternalInfo)
182#pragma alloc_text(PAGE, FatQueryNameInfo)
183#pragma alloc_text(PAGE, FatQueryNetworkInfo)
184#pragma alloc_text(PAGE, FatQueryShortNameInfo)
185#pragma alloc_text(PAGE, FatQueryPositionInfo)
186#pragma alloc_text(PAGE, FatQueryStandardInfo)
187#pragma alloc_text(PAGE, FatSetAllocationInfo)
188#pragma alloc_text(PAGE, FatSetBasicInfo)
189#pragma alloc_text(PAGE, FatSetDispositionInfo)
190#pragma alloc_text(PAGE, FatSetEndOfFileInfo)
191#pragma alloc_text(PAGE, FatSetValidDataLengthInfo)
192#pragma alloc_text(PAGE, FatSetPositionInfo)
193#pragma alloc_text(PAGE, FatSetRenameInfo)
194#pragma alloc_text(PAGE, FatDeleteFile)
195#pragma alloc_text(PAGE, FatRenameEAs)
203FatFsdQueryInformation (
250 Status = FatCommonQueryInformation( IrpContext,
Irp );
284FatFsdSetInformation (
331 Status = FatCommonSetInformation( IrpContext,
Irp );
363FatCommonQueryInformation (
428 Buffer =
Irp->AssociatedIrp.SystemBuffer;
501 if (!FatAcquireSharedFcb( IrpContext,
Fcb )) {
520 FatVerifyFcb( IrpContext,
Fcb );
586#if (NTDDI_VERSION >= NTDDI_VISTA)
615 "FATQueryFile, Illegal TypeOfOpen = %08lx\n",
663FatCommonSetInformation (
831#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
856 if (!FatAcquireExclusiveFcb( IrpContext,
Fcb )) {
877 FatVerifyFcb( IrpContext,
Fcb );
1013 if ( IrpContext !=
NULL ) {
1105 &
Buffer->LastWriteTime );
1131 if (
Buffer->FileAttributes == 0) {
1156FatQueryStandardInfo (
1197 Buffer->NumberOfLinks = 1;
1210 FatLookupFileAllocationSize( IrpContext,
Fcb );
1370 FatGetDirentFromFcbOrDcb( IrpContext,
1381 FatGetEaLength( IrpContext,
1540 FatSetFullFileNameInFcb( IrpContext,
Fcb );
1589 if (*Length < Fcb->FullFileName.Length - TrimLength) {
1616 if (TrimLength != 0) {
1619 WCHAR ShortNameBuffer[12];
1629 ShortName.MaximumLength =
sizeof(ShortNameBuffer);
1633#pragma prefast( suppress:28931, "needed for debug build" )
1719 WCHAR ShortNameBuffer[12];
1731 ShortName.MaximumLength =
sizeof(ShortNameBuffer);
1737#pragma prefast( suppress:28931, "needed for debug build" )
1786FatQueryNetworkInfo (
1846 &
Buffer->LastWriteTime );
1872 if (
Buffer->FileAttributes == 0) {
1886 FatLookupFileAllocationSize( IrpContext,
Fcb );
1889 Buffer->AllocationSize.QuadPart =
Fcb->
Header.AllocationSize.QuadPart;
1953 UCHAR CreationMSec = 0;
1963#if (NTDDI_VERSION >= NTDDI_WIN8)
1977 Buffer =
Irp->AssociatedIrp.SystemBuffer;
1991 if (
Buffer->LastWriteTime.QuadPart == -1) {
1994 Buffer->LastWriteTime.QuadPart = 0;
1997 if (
Buffer->LastAccessTime.QuadPart == -1) {
2000 Buffer->LastAccessTime.QuadPart = 0;
2003 if (
Buffer->CreationTime.QuadPart == -1) {
2006 Buffer->CreationTime.QuadPart = 0;
2019 &FatLocalDecThirtyOne1979 );
2022 &FatLocalJanOne1980 );
2030 FatGetDirentFromFcbOrDcb( IrpContext,
2041 LargeCreationTime =
Buffer->CreationTime;
2047 if ( !FatNtTimeToFatTime( IrpContext,
2062 LargeCreationTime = FatLocalJanOne1980;
2077 ModifyCreation =
TRUE;
2086 LargeLastAccessTime =
Buffer->LastAccessTime;
2092 if ( !FatNtTimeToFatTime( IrpContext,
2093 &LargeLastAccessTime,
2107 LargeLastAccessTime = FatLocalJanOne1980;
2116 LastAccessDate = LastAccessTime.
Date;
2117 ModifyLastAccess =
TRUE;
2124 if (
Buffer->LastWriteTime.QuadPart != 0) {
2131 if (ModifyLastAccess &&
2132 (
Buffer->LastWriteTime.QuadPart ==
Buffer->LastAccessTime.QuadPart)) {
2134 ModifyLastWrite =
TRUE;
2135 LastWriteTime = LastAccessTime;
2136 LargeLastWriteTime = LargeLastAccessTime;
2140 LargeLastWriteTime =
Buffer->LastWriteTime;
2146 if ( !FatNtTimeToFatTime( IrpContext,
2147 &LargeLastWriteTime,
2162 LargeLastWriteTime = FatLocalJanOne1980;
2171 ModifyLastWrite =
TRUE;
2180 if (
Buffer->FileAttributes != 0) {
2202 DebugTrace(0,
Dbg,
"Attempt to set dir attribute on file\n", 0);
2257#if (NTDDI_VERSION >= NTDDI_WIN8)
2258 ModifiedAttributes =
TRUE;
2263 if ( ModifyCreation ) {
2272 Dirent->CreationMSec = CreationMSec;
2294 if ( ModifyLastAccess ) {
2302 Dirent->LastAccessDate = LastAccessDate;
2331 if ( ModifyLastWrite ) {
2380 Dirent->FirstClusterOfFileHi =
2391 FatSetDirtyBcb( IrpContext, DirentBcb,
Fcb->
Vcb,
TRUE );
2394#if (NTDDI_VERSION >= NTDDI_WIN8)
2401 (ModifyLastAccess ||
2403 ModifiedAttributes)) {
2406 IrpContext->OriginatingIrp,
2407 OPLOCK_FLAG_PARENT_OBJECT,
2433FatSetDispositionInfo (
2472 Buffer =
Irp->AssociatedIrp.SystemBuffer;
2479 if (
Buffer->DeleteFile) {
2497 MmFlushForDelete )) {
2499 DebugTrace(-1,
Dbg,
"Cannot delete user mapped image\n", 0);
2518 DebugTrace(-1,
Dbg,
"User wants to delete a directory\n", 0);
2524 if ( !FatIsDirectoryEmpty(IrpContext,
Fcb) ) {
2549 BytesToMap =
Vcb->AllocationSupport.FatIndexBitSize == 12 ?
2558 (
PVOID *)&LocalBuffer );
2582 TmpChar = LocalBuffer[0];
2583 LocalBuffer[0] = TmpChar;
2588 Vcb->Bpb.BytesPerSector );
2602 DbgDoit( IrpContext->PinCount -= 1 );
2623 FatGetDirentFromFcbOrDcb( IrpContext,
2683 DebugTrace(-1,
Dbg,
"FatSetDispositionInfo -> STATUS_SUCCESS\n", 0);
2737 BOOLEAN RenamedAcrossDirectories;
2749 UCHAR OemNameBuffer[24*2];
2755 PBCB TargetDirentBcb;
2777 ULONG BytesInFirstPage = 0;
2778 ULONG DirentsInFirstPage = 0;
2779 ULONG DirentsRequired = 0;
2780 ULONG NewOffset = 0;
2781 ULONG NotifyAction = 0;
2782 ULONG SecondPageOffset = 0;
2783 ULONG ShortDirentOffset = 0;
2784 ULONG TargetDirentOffset = 0;
2785 ULONG TargetLfnOffset = 0;
2803 WCHAR UniTunneledShortNameBuffer[12];
2805 WCHAR UniTunneledLongNameBuffer[26];
2808 ULONG TunneledDataSize;
2825 CaseOnlyRename =
FALSE;
2826 ContinueWithRename =
FALSE;
2827 DeleteSourceDirent =
FALSE;
2828 DeleteTarget =
FALSE;
2829 NewDirentFromPool =
FALSE;
2830 RenamedAcrossDirectories =
FALSE;
2833 NewDirentBcb =
NULL;
2834 OldDirentBcb =
NULL;
2835 SecondPageBcb =
NULL;
2836 TargetDirentBcb =
NULL;
2838 NewOemName.Length = 0;
2839 NewOemName.MaximumLength = 24;
2840 NewOemName.Buffer = (
PCHAR)&OemNameBuffer[0];
2842 OldOemName.Length = 0;
2843 OldOemName.MaximumLength = 24;
2844 OldOemName.Buffer = (
PCHAR)&OemNameBuffer[24];
2850 NewUpcasedName.
Length = 0;
2852 NewUpcasedName.
Buffer = &UnicodeBuffer[0];
2858 OldUpcasedName.
Length = 0;
2870 UniTunneledShortName.
Length = 0;
2871 UniTunneledShortName.
MaximumLength =
sizeof(UniTunneledShortNameBuffer);
2872 UniTunneledShortName.
Buffer = &UniTunneledShortNameBuffer[0];
2874 UniTunneledLongName.
Length = 0;
2875 UniTunneledLongName.
MaximumLength =
sizeof(UniTunneledLongNameBuffer);
2876 UniTunneledLongName.
Buffer = &UniTunneledLongNameBuffer[0];
2885 OldOemName.Length );
2930 PFCB BatchOplockFcb;
2931 ULONG BatchOplockCount;
2940 BatchOplockFcb =
NULL;
2941 BatchOplockCount = 0;
2962#if (NTDDI_VERSION >= NTDDI_WIN7)
2968 BatchOplockCount += 1;
2969 if ( BatchOplockFcb ==
NULL ) {
2971 BatchOplockFcb = TempFcb;
2986 if ( BatchOplockFcb !=
NULL ) {
2988 if ( (
Irp->IoStatus.Information != 0) &&
2989 (BatchOplockCount >=
Irp->IoStatus.Information) ) {
2998 Irp->IoStatus.Information = BatchOplockCount;
3031 FatPurgeReferencedFileObjects( IrpContext,
Fcb,
Flush );
3044 FatAcquireExclusiveFcb( IrpContext, TempFcb );
3062 if (TargetFileObject ==
NULL) {
3072 Buffer =
Irp->AssociatedIrp.SystemBuffer;
3105 (TargetVcb !=
Vcb)) {
3132 FatGetUnicodeNameFromFcb( IrpContext,
Fcb, &OldName );
3171 CaseOnlyRename =
TRUE;
3176 RenamedAcrossDirectories =
TRUE;
3197 NewOemName.Length = 0;
3202 NewOemName.Length = 0;
3213 &UniTunneledShortName,
3214 &UniTunneledLongName,
3216 &TunneledCreationTime );
3225 if ((NewOemName.Length == 0) ||
3242 if (UniTunneledLongName.
Length &&
3243 !FatLfnDirentExists(IrpContext,
TargetDcb, &UniTunneledLongName, &TargetLfn)) {
3255 DirentsRequired = 1;
3271 if (NewOemName.Length == 0) {
3283 UsingTunneledLfn =
FALSE;
3286 if (!CaseOnlyRename) {
3293 if (NewOemName.Length != 0) {
3310 FatLocateDirent( IrpContext,
3317 (
PVBO)&TargetDirentOffset,
3322 if (TargetDirent !=
NULL) {
3331 if ((!ReplaceIfExists) ||
3357 Links = Links->
Flink;
3362 MmFlushForDelete))) {
3406 TargetLfnOffset = TargetDirentOffset -
3410 DeleteTarget =
TRUE;
3428 NewOffset = FatCreateNewDirent( IrpContext,
3433 DeleteSourceDirent =
TRUE;
3440 ContinueWithRename =
TRUE;
3446 if (!ContinueWithRename) {
3462 if (!ContinueWithRename) {
3480 if (!RenamedAcrossDirectories && !DeleteTarget) {
3503 FatGetDirentFromFcbOrDcb( IrpContext,
Fcb,
FALSE, &OldDirent, &OldDirentBcb );
3521 InvalidateFcbOnRaise =
TRUE;
3527 if (DeleteSourceDirent) {
3538 FatDeleteFile( IrpContext,
3556 FatSelectNames( IrpContext,
3561 (HaveTunneledInformation ? &UniTunneledShortName :
NULL),
3583 FatPrepareWriteDirectoryFile( IrpContext,
3591 (
PVOID *)&NewDirent,
3609 BytesInFirstPage = SecondPageOffset - NewOffset;
3611 DirentsInFirstPage = BytesInFirstPage /
sizeof(
DIRENT);
3613 FatPrepareWriteDirectoryFile( IrpContext,
3621 (
PVOID *)&SecondPageDirent,
3629 FirstPageDirent = NewDirent;
3632 DirentsRequired *
sizeof(
DIRENT),
3635 NewDirentFromPool =
TRUE;
3642 ShortDirent = NewDirent + DirentsRequired - 1;
3643 ShortDirentOffset = NewOffset + (DirentsRequired - 1) *
sizeof(
DIRENT);
3659 (HaveTunneledInformation ? &TunneledCreationTime :
NULL) );
3661 if (HaveTunneledInformation) {
3679 if (NewDirentFromPool) {
3681 RtlCopyMemory( FirstPageDirent, NewDirent, BytesInFirstPage );
3684 NewDirent + DirentsInFirstPage,
3685 DirentsRequired*
sizeof(
DIRENT) - BytesInFirstPage );
3687 ShortDirent = SecondPageDirent +
3688 (DirentsRequired - DirentsInFirstPage) - 1;
3754#if (NTDDI_VERSION >= NTDDI_WIN8)
3762 IrpContext->OriginatingIrp,
3763 OPLOCK_FLAG_PARENT_OBJECT,
3773 if (RenamedAcrossDirectories) {
3775#if (NTDDI_VERSION >= NTDDI_WIN8)
3783 IrpContext->OriginatingIrp,
3784 OPLOCK_FLAG_PARENT_OBJECT,
3802 DirectoryFileObject = OldParentDcb->
Specific.
Dcb.DirectoryFile;
3814 FatPrepareWriteDirectoryFile( IrpContext,
3822 (
PVOID *)&DotDotDirent,
3830 DotDotDirent->FirstClusterOfFile = (
USHORT)
3836 DotDotDirent->FirstClusterOfFileHi = (
USHORT)
3865 InvalidateFcbOnRaise =
FALSE;
3904 }
else if (RenamedAcrossDirectories) {
3933 Dirent.ExtendedAttributes != 0) {
3935 FatRenameEAs( IrpContext,
3937 Dirent.ExtendedAttributes,
3957 if (UniTunneledLongName.
Buffer != UniTunneledLongNameBuffer) {
3966 if (NewDirentFromPool) {
3978 if (DirectoryFileObject) {
3980 DebugTrace(0,
Dbg,
"Uninitialize our parent Stream Cache Map\n", 0);
4043 Buffer =
Irp->AssociatedIrp.SystemBuffer;
4059 DebugTrace(0,
Dbg,
"Cannot set position due to aligment conflict\n", 0);
4089FatSetAllocationInfo (
4123 ULONG NewAllocationSize = 0;
4124 ULONG HeaderSize = 0;
4129 ULONG OriginalFileSize = 0;
4130 ULONG OriginalValidDataLength = 0;
4131 ULONG OriginalValidDataToDisk = 0;
4135 Buffer =
Irp->AssociatedIrp.SystemBuffer;
4137 NewAllocationSize =
Buffer->AllocationSize.LowPart;
4139 DebugTrace(+1,
Dbg,
"FatSetAllocationInfo.. to %08lx\n", NewAllocationSize);
4147 DebugTrace(-1,
Dbg,
"Cannot change allocation of a directory\n", 0);
4171 FatLookupFileAllocationSize( IrpContext,
Fcb );
4180 if ((
FileObject->SectionObjectPointer->DataSectionObject !=
NULL) &&
4196 CacheMapInitialized =
TRUE;
4217 if (NewAllocationSize+HeaderSize >
Fcb->
Header.AllocationSize.LowPart) {
4219 FatAddFileAllocation( IrpContext,
Fcb,
FileObject, NewAllocationSize+HeaderSize);
4228 if (
Fcb->
Header.FileSize.LowPart > NewAllocationSize+HeaderSize ) {
4250 &
Buffer->AllocationSize )) {
4255 FileSizeTruncated =
TRUE;
4257 OriginalFileSize =
Fcb->
Header.FileSize.LowPart;
4258 OriginalValidDataLength =
Fcb->
Header.ValidDataLength.LowPart;
4262 ResourceAcquired =
TRUE;
4264 Fcb->
Header.FileSize.LowPart = NewAllocationSize;
4286 FatTruncateFileAllocation( IrpContext,
Fcb, NewAllocationSize+HeaderSize );
4292 if ( FileSizeTruncated ) {
4324 FileSizeTruncated =
FALSE;
4326 FatSetFileSizeInDirent( IrpContext,
Fcb,
NULL );
4346 Fcb->
Header.FileSize.LowPart = OriginalFileSize;
4347 Fcb->
Header.ValidDataLength.LowPart = OriginalValidDataLength;
4362 if (CacheMapInitialized) {
4367 if (ResourceAcquired) {
4387FatSetEndOfFileInfo (
4426 ULONG InitialFileSize = 0;
4427 ULONG InitialValidDataLength = 0;
4428 ULONG InitialValidDataToDisk = 0;
4439 Buffer =
Irp->AssociatedIrp.SystemBuffer;
4449 DebugTrace(0,
Dbg,
"Cannot change size of a directory\n", 0);
4477 FatLookupFileAllocationSize( IrpContext,
Fcb );
4486 if ((
FileObject->SectionObjectPointer->DataSectionObject !=
NULL) &&
4517 CacheMapInitialized =
TRUE;
4558 FatGetDirentFromFcbOrDcb( IrpContext,
4569 FatSetDirtyBcb( IrpContext, DirentBcb,
Fcb->
Vcb,
TRUE );
4590 DebugTrace(0,
Dbg,
"Cannot set size on deleted file.\n", 0);
4620 if ( NewFileSize < Fcb->
Header.FileSize.LowPart ) {
4661 InitialFileSize =
Fcb->
Header.FileSize.LowPart;
4662 InitialValidDataLength =
Fcb->
Header.ValidDataLength.LowPart;
4664 UnwindFileSizes =
TRUE;
4692 FatSetFileSizeInDirent( IrpContext,
Fcb,
NULL );
4734 Fcb->
Header.FileSize.LowPart = InitialFileSize;
4735 Fcb->
Header.ValidDataLength.LowPart = InitialValidDataLength;
4757 FatSetFileSizeInDirentNoRaise( IrpContext,
Fcb,
NULL );
4761 if (CacheMapInitialized) {
4766 if ( ResourceAcquired ) {
4784FatSetValidDataLengthInfo (
4823 ULONG NewValidDataLength;
4832 Buffer =
Irp->AssociatedIrp.SystemBuffer;
4851 DebugTrace(0,
Dbg,
"Cannot change VDL of a directory\n", 0);
4869 NewValidDataLength =
Buffer->ValidDataLength.LowPart;
4875 if ((NewValidDataLength < Fcb->
Header.ValidDataLength.LowPart) ||
4876 (NewValidDataLength >
Fcb->
Header.FileSize.LowPart)) {
4887 &
Buffer->ValidDataLength )) {
4896 if (
FileObject->SectionObjectPointer->DataSectionObject !=
NULL) {
4921 Fcb->
Header.ValidDataLength.LowPart = NewValidDataLength;
4924 DebugTrace(0,
Dbg,
"New VDL is 0x%08lx.\n", NewValidDataLength);
4954 if (ResourceAcquired) {
5008 FatGetEaFile( IrpContext,
5022 if (
Vcb->VirtualEaFile !=
NULL) {
5109 Links = Links->
Flink) {
5122#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
5145 Fcb->
Header.ValidDataLength.QuadPart = 0;
5176 FatTruncateFileAllocation( IrpContext,
Fcb, 0 );
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
VOID NTAPI CcUnpinRepinnedBcb(IN PVOID Bcb, IN BOOLEAN WriteThrough, OUT PIO_STATUS_BLOCK IoStatus)
VOID NTAPI CcFlushCache(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, OUT OPTIONAL PIO_STATUS_BLOCK IoStatus)
VOID NTAPI CcSetDirtyPinnedData(IN PVOID BcbVoid, IN OPTIONAL PLARGE_INTEGER Lsn)
VOID NTAPI CcRepinBcb(IN PVOID Bcb)
#define CcGetFileSizePointer(FO)
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT _Inout_ PDIRENT Dirent
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN TypeOfOpen
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
enum _TYPE_OF_OPEN TYPE_OF_OPEN
#define IRP_CONTEXT_FLAG_WAIT
#define _Requires_lock_held_(lock)
#define NT_SUCCESS(StatCode)
#define FILE_ATTRIBUTE_NORMAL
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING Lfn
_In_ PIO_STACK_LOCATION IrpSp
VOID FatSetFullNameInFcb(_In_ PIRP_CONTEXT IrpContext, _Inout_ PFCB Fcb, _In_ PUNICODE_STRING FinalName)
EA_SET_HEADER * PEA_SET_HEADER
#define FAT_DIRENT_ATTR_READ_ONLY
#define FatReservedBytes(B)
#define FAT_DIRENT_ATTR_DIRECTORY
#define FatBytesPerFat(B)
VOID FatQueryInternalInfo(IN PIRP_CONTEXT IrpContext, IN PFCB Fcb, IN OUT PFILE_INTERNAL_INFORMATION Buffer, IN OUT PLONG Length)
VOID FatQueryPositionInfo(IN PIRP_CONTEXT IrpContext, IN PFILE_OBJECT FileObject, IN OUT PFILE_POSITION_INFORMATION Buffer, IN OUT PLONG Length)
NTSTATUS FatSetPositionInfo(IN PIRP_CONTEXT IrpContext, IN PIRP Irp, IN PFILE_OBJECT FileObject)
VOID FatQueryEaInfo(IN PIRP_CONTEXT IrpContext, IN PFCB Fcb, IN OUT PFILE_EA_INFORMATION Buffer, IN OUT PLONG Length)
VOID FatQueryBasicInfo(IN PIRP_CONTEXT IrpContext, IN PFCB Fcb, IN PFILE_OBJECT FileObject, IN OUT PFILE_BASIC_INFORMATION Buffer, IN OUT PLONG Length)
VOID FatQueryShortNameInfo(IN PIRP_CONTEXT IrpContext, IN PFCB Fcb, IN OUT PFILE_NAME_INFORMATION Buffer, IN OUT PLONG Length)
NTSTATUS FatSetRenameInfo(IN PIRP_CONTEXT IrpContext, IN PIRP Irp, IN PVCB Vcb, IN PFCB Fcb, IN PCCB Ccb)
#define MAX_LFN_CHARACTERS
#define FAT_LFN_DIRENTS_NEEDED(NAME)
#define FatBugCheck(A, B, C)
#define TAG_FILENAME_BUFFER
VOID FatMarkEaRangeDirty(IN PIRP_CONTEXT IrpContext, IN PFILE_OBJECT EaFileObject, IN OUT PEA_RANGE EaRange)
VOID FatUnpinEaRange(IN PIRP_CONTEXT IrpContext, IN OUT PEA_RANGE EaRange)
VOID FatReadEaSet(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN USHORT EaHandle, IN POEM_STRING FileName, IN BOOLEAN ReturnEntireSet, OUT PEA_RANGE EaSetRange)
#define ExLocalTimeToSystemTime(LocTime, SysTime)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
UNICODE_STRING * PUNICODE_STRING
#define IsListEmpty(ListHead)
NTSTATUS RtlUpcaseUnicodeString(PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExSystemTimeToLocalTime(SysTime, LocTime)
#define ClearFlag(_F, _SF)
#define IsFileDeleted(Mcb)
#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)
VOID FatReadVolumeFile(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN VBO StartingVbo, IN ULONG ByteCount, OUT PBCB *Bcb, OUT PVOID *Buffer)
VOID FatTunnelFcbOrDcb(IN PFCB FcbOrDcb, IN PCCB Ccb OPTIONAL)
VOID FatConstructDirent(IN PIRP_CONTEXT IrpContext, IN OUT PDIRENT Dirent, IN POEM_STRING FileName, IN BOOLEAN ComponentReallyLowercase, IN BOOLEAN ExtensionReallyLowercase, IN PUNICODE_STRING Lfn OPTIONAL, IN USHORT Attributes, IN BOOLEAN ZeroAndSetTimeFields, IN PLARGE_INTEGER SetCreationTime OPTIONAL)
LARGE_INTEGER FatJanOne1980
LARGE_INTEGER FatDecThirtyOne1979
FAT_TIME_STAMP FatTimeJanOne1980
ULONG FatExceptionFilter(IN PIRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
BOOLEAN FatIsIrpTopLevel(IN PIRP Irp)
LARGE_INTEGER FatLargeZero
#define DebugTrace(INDENT, LEVEL, X, Y)
IN PDCB IN ULONG LfnOffset
VOID FatDeleteFcb(IN PIRP_CONTEXT IrpContext, IN PFCB *Fcb)
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
IN PVCB IN ULONG IN PBCB OUT PDIRENT OUT PUSHORT OUT PEA_RANGE EaSetRange
VOID FatUnicodeToUpcaseOem(IN PIRP_CONTEXT IrpContext, IN POEM_STRING OemString, IN PUNICODE_STRING UnicodeString)
#define FatUnpinBcb(IRPCONTEXT, BCB)
VOID FatStringTo8dot3(_In_ PIRP_CONTEXT IrpContext, _In_ OEM_STRING InputString, _Out_writes_bytes_(11) PFAT8DOT3 Output8dot3)
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING IN PUNICODE_STRING SuggestedShortName IN OUT BOOLEAN IN OUT BOOLEAN IN OUT BOOLEAN * CreateLfn
NTSTATUS FatFsdPostRequest(IN PIRP_CONTEXT IrpContext, IN PIRP Irp)
TYPE_OF_OPEN FatDecodeFileObject(_In_ PFILE_OBJECT FileObject, _Outptr_ PVCB *Vcb, _Outptr_ PFCB *FcbOrDcb, _Outptr_ PCCB *Ccb)
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING IN PUNICODE_STRING SuggestedShortName IN OUT BOOLEAN * AllLowerComponent
IN PFCB IN PCCB IN TYPE_OF_OPEN IN BOOLEAN IN BOOLEAN TopLevel
#define FatCompleteRequest(IRPCONTEXT, IRP, STATUS)
#define FatNotifyReportChange(I, V, F, FL, A)
VOID FatEvaluateNameCase(IN PIRP_CONTEXT IrpContext, IN PUNICODE_STRING Name, IN OUT BOOLEAN *AllLowerComponent, IN OUT BOOLEAN *AllLowerExtension, IN OUT BOOLEAN *CreateLfn)
#define FatReleaseFcb(IRPCONTEXT, Fcb)
PFCB FatCreateFcb(IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PDCB ParentDcb, IN ULONG LfnOffsetWithinDirectory, IN ULONG DirentOffsetWithinDirectory, IN PDIRENT Dirent, IN PUNICODE_STRING Lfn OPTIONAL, IN PUNICODE_STRING OrigLfn OPTIONAL, IN BOOLEAN IsPagingFile, IN BOOLEAN SingleResource)
BOOLEAN FatSpaceInName(IN PIRP_CONTEXT IrpContext, IN PUNICODE_STRING UnicodeName)
VOID FatConstructNamesInFcb(IN PIRP_CONTEXT IrpContext, PFCB Fcb, PDIRENT Dirent, PUNICODE_STRING Lfn OPTIONAL)
#define FatAcquireExclusiveVcb(IC, V)
PFCB FatGetNextFcbBottomUp(IN PIRP_CONTEXT IrpContext, IN PFCB Fcb, IN PFCB TerminationFcb)
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING ShortName
BOOLEAN FatAddMcbEntry(IN PVCB Vcb, IN PLARGE_MCB Mcb, IN VBO Vbo, IN LBO Lbo, IN ULONG SectorCount)
#define FatGenerateFileIdFromFcb(Fcb)
#define FatIsFastIoPossible(FCB)
VOID NTAPI FatOplockComplete(IN PVOID Context, IN PIRP Irp)
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING IN PUNICODE_STRING SuggestedShortName IN OUT BOOLEAN IN OUT BOOLEAN * AllLowerExtension
#define FatIsNameShortOemValid(IRPCONTEXT, NAME, CAN_CONTAIN_WILD_CARDS, PATH_NAME_OK, LEADING_BACKSLASH_OK)
#define FatNormalizeAndRaiseStatus(IRPCONTEXT, STATUS)
#define FatRaiseStatus(IRPCONTEXT, STATUS)
#define FatGetFcbOplock(F)
VOID FatRemoveNames(IN PIRP_CONTEXT IrpContext, IN PFCB Fcb)
#define FatIsFileOplockable(F)
IN OUT PVCB OUT PDIRENT OUT PBCB * EaBcb
LARGE_INTEGER FatFatTimeToNtTime(_In_ PIRP_CONTEXT IrpContext, _In_ FAT_TIME_STAMP FatTime, _In_ UCHAR TenMilliSeconds)
#define FatReleaseVcb(IRPCONTEXT, Vcb)
#define FatDirectoryKey(FcbOrDcb)
LARGE_INTEGER FatFatDateToNtTime(_In_ PIRP_CONTEXT IrpContext, _In_ FAT_DATE FatDate)
IN OUT PVCB OUT PDIRENT * EaDirent
PIRP_CONTEXT FatCreateIrpContext(IN PIRP Irp, IN BOOLEAN Wait)
static INLINE BOOLEAN FatIsIoRangeValid(IN PVCB Vcb, IN LARGE_INTEGER Start, IN ULONG Length)
#define CCB_FLAG_MANAGE_VOLUME_ACCESS
#define CCB_FLAG_USER_SET_LAST_WRITE
#define VCB_STATE_FLAG_REMOVABLE_MEDIA
#define VCB_STATE_FLAG_DEFERRED_FLUSH
#define CCB_FLAG_OPENED_BY_SHORTNAME
#define CCB_FLAG_SKIP_SHORT_NAME_COMPARE
#define VCB_STATE_FLAG_CREATE_IN_PROGRESS
#define FCB_STATE_TEMPORARY
#define FCB_STATE_DELETE_ON_CLOSE
#define FCB_LOOKUP_ALLOCATIONSIZE_HINT
#define FCB_STATE_TRUNCATE_ON_CLOSE
#define CCB_FLAG_USER_SET_LAST_ACCESS
#define FCB_STATE_NAMES_IN_SPLAY_TREE
#define FCB_STATE_PAGING_FILE
#define CCB_FLAG_USER_SET_CREATION
@ FilePositionInformation
@ FileEndOfFileInformation
@ FileInternalInformation
@ FileNormalizedNameInformation
@ FileAlternateNameInformation
@ FileValidDataLengthInformation
@ FileAllocationInformation
@ FileNetworkOpenInformation
@ FileDispositionInformation
struct _FILE_NETWORK_OPEN_INFORMATION FILE_NETWORK_OPEN_INFORMATION
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
struct _FILE_INTERNAL_INFORMATION FILE_INTERNAL_INFORMATION
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
VOID NTAPI CcSetFileSizes(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes)
BOOLEAN NTAPI CcUninitializeCacheMap(IN PFILE_OBJECT FileObject, IN OPTIONAL PLARGE_INTEGER TruncateSize, IN OPTIONAL PCACHE_UNINITIALIZE_EVENT UninitializeEvent)
BOOLEAN NTAPI CcPurgeCacheSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN UninitializeCacheMaps)
struct _FILE_EA_INFORMATION FILE_EA_INFORMATION
#define FILE_STANDARD_INFORMATION
#define FILE_BASIC_INFORMATION
static OUT PIO_STATUS_BLOCK OUT PVOID IN ULONG IN FILE_INFORMATION_CLASS FileInformationClass
#define _Function_class_(x)
_In_ UINT _In_ UINT BytesToCopy
#define DPFLTR_INFO_LEVEL
DRIVER_DISPATCH(nfs41_FsdDispatch)
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
struct _FILE_POSITION_INFORMATION FILE_POSITION_INFORMATION
struct _FILE_ALIGNMENT_INFORMATION FILE_ALIGNMENT_INFORMATION
#define FILE_ATTRIBUTE_ARCHIVE
#define FILE_ATTRIBUTE_DIRECTORY
#define FILE_FLOPPY_DISKETTE
#define FILE_ATTRIBUTE_TEMPORARY
#define UNREFERENCED_PARAMETER(P)
_In_ ULONG _In_ ULONG _In_ ULONG Length
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
PVOID NTAPI FsRtlAllocatePoolWithTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
BOOLEAN NTAPI FsRtlAreNamesEqual(IN PCUNICODE_STRING Name1, IN PCUNICODE_STRING Name2, IN BOOLEAN IgnoreCase, IN PCWCH UpcaseTable OPTIONAL)
VOID NTAPI FsRtlNotifyFullChangeDirectory(IN PNOTIFY_SYNC NotifySync, IN PLIST_ENTRY NotifyList, IN PVOID FsContext, IN PSTRING FullDirectoryName, IN BOOLEAN WatchTree, IN BOOLEAN IgnoreBuffer, IN ULONG CompletionFilter, IN PIRP NotifyIrp, IN PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback OPTIONAL, IN PSECURITY_SUBJECT_CONTEXT SubjectContext OPTIONAL)
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
#define STATUS_PURGE_FAILED
#define STATUS_FILE_CLOSED
#define STATUS_USER_MAPPED_FILE
BOOLEAN NTAPI FsRtlCurrentBatchOplock(IN POPLOCK Oplock)
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)
VOID NTAPI CcUnpinData(IN PVOID Bcb)
BOOLEAN NTAPI CcPinMappedData(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, IN OUT PVOID *Bcb)
struct _FILE_ACCESS_INFORMATION FILE_ACCESS_INFORMATION
#define FileStandardInformation
#define _SEH2_AbnormalTermination()
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
#define IRP_MJ_SET_INFORMATION
#define IRP_MJ_QUERY_INFORMATION
NTSTATUS NTAPI RtlOemStringToCountedUnicodeString(IN OUT PUNICODE_STRING UniDest, IN PCOEM_STRING OemSource, IN BOOLEAN AllocateDestinationString)
BOOLEAN NTAPI MmCanFileBeTruncated(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER NewFileSize)
BOOLEAN NTAPI MmFlushImageSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN MMFLUSH_TYPE FlushType)
#define STATUS_CANNOT_DELETE
#define STATUS_BUFFER_OVERFLOW
union _CCB::@733::@735::@737 OemQueryTemplate
UNICODE_STRING UnicodeQueryTemplate
BOOLEAN ContainsWildCards
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
LIST_ENTRY ParentDcbLinks
VBO LfnOffsetWithinDirectory
union _FCB::@729 Specific
UNICODE_STRING ExactCaseLongName
UNICODE_STRING FullFileName
FCB_CONDITION FcbCondition
LARGE_INTEGER LastWriteTime
struct _FCB::@729::@731 Dcb
FSRTL_ADVANCED_FCB_HEADER Header
LARGE_INTEGER LastAccessTime
union _FCB::@730 LongName
CLONG PurgeFailureModeEnableCount
VBO DirentOffsetWithinDirectory
union _FILE_NAME_NODE::@728 Name
PDEVICE_OBJECT DeviceObject
struct _IO_STACK_LOCATION::@3974::@3984 SetFile
struct _IO_STACK_LOCATION::@3974::@3983 QueryFile
union _IO_STACK_LOCATION::@1575 Parameters
struct _LIST_ENTRY * Flink
SECTION_OBJECT_POINTERS SectionObjectPointers
struct _DEVICE_OBJECT * RealDevice
BOOLEAN NTAPI FsRtlFindInTunnelCache(IN PTUNNEL Cache, IN ULONGLONG DirectoryKey, IN PUNICODE_STRING Name, OUT PUNICODE_STRING ShortName, OUT PUNICODE_STRING LongName, IN OUT PULONG DataLength, OUT PVOID Data)
#define FIELD_OFFSET(t, f)
union _LARGE_INTEGER LARGE_INTEGER
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_DIRECTORY_NOT_EMPTY
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_OBJECT_NAME_INVALID
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_Must_inspect_result_ _In_ ULONG Flags
#define FILE_NOTIFY_CHANGE_SIZE
#define FILE_ACTION_MODIFIED
#define FO_TEMPORARY_FILE
#define FILE_ACTION_RENAMED_OLD_NAME
#define FILE_NOTIFY_CHANGE_LAST_ACCESS
#define FILE_NOTIFY_CHANGE_ATTRIBUTES
#define FILE_ACTION_REMOVED
#define FILE_NOTIFY_CHANGE_FILE_NAME
#define FO_CLEANUP_COMPLETE
#define FILE_ACTION_RENAMED_NEW_NAME
#define FO_NO_INTERMEDIATE_BUFFERING
#define FILE_NOTIFY_CHANGE_CREATION
#define FILE_NOTIFY_CHANGE_LAST_WRITE
#define FILE_NOTIFY_CHANGE_EA
#define FILE_ACTION_ADDED
#define FILE_NOTIFY_CHANGE_DIR_NAME
_In_opt_ PLARGE_INTEGER NewFileSize
#define ObDereferenceObject
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID _Out_ PIO_STATUS_BLOCK _In_ ULONG NotifyFilter
_In_ PUNICODE_STRING NewName