23#define BugCheckFileId (CDFS_BUG_CHECK_CACHESUP)
30#pragma alloc_text(PAGE, CdCompleteMdl)
31#pragma alloc_text(PAGE, CdCreateInternalStream)
32#pragma alloc_text(PAGE, CdDeleteInternalStream)
33#pragma alloc_text(PAGE, CdPurgeVolume)
107 if (StreamFile ==
NULL) {
116 StreamFile->ReadAccess =
TRUE;
117 StreamFile->WriteAccess =
FALSE;
118 StreamFile->DeleteAccess =
FALSE;
126 CdSetFileObject( IrpContext,
138 StreamFile->FileName = *
Name;
150 DecrementReference =
TRUE;
186 CleanupDirContext =
TRUE;
220 if (NewDataLength == 0) {
225 if (NewDataLength !=
Fcb->FileSize.QuadPart) {
227 Fcb->AllocationSize.QuadPart =
228 Fcb->FileSize.QuadPart =
229 Fcb->ValidDataLength.QuadPart = NewDataLength;
239 UpdateFcbSizes =
TRUE;
273 CleanupDirContext =
FALSE;
275 if (UpdateFcbSizes) {
290 if (CleanupDirContext) {
300 if (StreamFile !=
NULL) {
307 StreamFile->FileName.Buffer =
NULL;
308 StreamFile->FileName.MaximumLength = StreamFile->FileName.Length = 0;
318 if (DecrementReference) {
538 if (NextFcb !=
NULL) {
548 if (ThisFcb !=
NULL) {
554 CdTeardownStructures( IrpContext, ThisFcb, &RemovedFcb );
565 if (NextFcb ==
NULL) {
619 if (
Vcb->PathTableFcb !=
NULL) {
621 ThisFcb =
Vcb->PathTableFcb;
638 CdTeardownStructures( IrpContext, ThisFcb, &RemovedFcb );
641 if (
Vcb->VolumeDasdFcb !=
NULL) {
643 ThisFcb =
Vcb->VolumeDasdFcb;
658 CdTeardownStructures( IrpContext, ThisFcb, &RemovedFcb );
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
#define InterlockedDecrement
VOID NTAPI CcMdlReadComplete(IN PFILE_OBJECT FileObject, IN PMDL MdlChain)
#define CD_ATTRIBUTE_HIDDEN
#define CdConvertCdTimeToNtTime(IC, CD, NT)
WCHAR CdUnicodeSelfArray[]
VOID CdCompleteRequest(_Inout_opt_ PIRP_CONTEXT IrpContext, _Inout_opt_ PIRP Irp, _In_ NTSTATUS Status)
#define ASSERT_IRP_CONTEXT(IC)
#define ASSERT_EXCLUSIVE_VCB(V)
VOID CdTruncateAllocation(_In_ PIRP_CONTEXT IrpContext, _Inout_ PFCB Fcb, _In_ LONGLONG StartingFileOffset)
VOID CdAddInitialAllocation(_In_ PIRP_CONTEXT IrpContext, _Inout_ PFCB Fcb, _In_ ULONG StartingBlock, _In_ LONGLONG DataLength)
VOID CdCreateInternalStream(_In_ PIRP_CONTEXT IrpContext, _In_ PVCB Vcb, _Inout_ PFCB Fcb, _In_ PUNICODE_STRING Name)
VOID CdDeleteInternalStream(_In_ PIRP_CONTEXT IrpContext, _Inout_ PFCB Fcb)
NTSTATUS CdCompleteMdl(_In_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
#define CdInitializeDirent(IC, D)
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT _Inout_ PDIRENT Dirent
VOID CdFspClose(_In_opt_ PVCB Vcb)
VOID CdUpdateDirentName(_In_ PIRP_CONTEXT IrpContext, _Inout_ PDIRENT Dirent, _In_ ULONG IgnoreCase)
_In_ PVCB _In_ BOOLEAN DismountUnderway
#define CdCleanupDirContext(IC, DC)
#define CdUnlockVcb(IC, V)
#define CdReleaseAllFiles(IC, V)
VOID CdLookupDirent(_In_ PIRP_CONTEXT IrpContext, _In_ PFCB Fcb, _In_ ULONG DirentOffset, _Out_ PDIRENT_ENUM_CONTEXT DirContext)
#define CdCleanupDirent(IC, D)
#define CdInitializeDirContext(IC, DC)
#define CdDecrementReferenceCounts(IC, F, C, UC)
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT DirContext
PFCB CdGetNextFcb(_In_ PIRP_CONTEXT IrpContext, _In_ PVCB Vcb, _In_ PVOID *RestartKey)
#define CdAcquireAllFiles(IC, V)
#define CdUnlockFcb(IC, F)
#define CdIncrementReferenceCounts(IC, F, C, UC)
#define CdRaiseStatus(IC, S)
#define FCB_STATE_INITIALIZED
#define _Requires_lock_held_(lock)
#define SafeNodeType(Ptr)
#define CDFS_NTC_FCB_DATA
VOID NTAPI CcSetFileSizes(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes)
VOID NTAPI CcInitializeCacheMap(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes, IN BOOLEAN PinAccess, IN PCACHE_MANAGER_CALLBACKS Callbacks, IN PVOID LazyWriteContext)
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)
#define FILE_ATTRIBUTE_HIDDEN
#define UNREFERENCED_PARAMETER(P)
PFILE_OBJECT NTAPI IoCreateStreamFileObjectLite(IN PFILE_OBJECT FileObject OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL)
#define STATUS_UNABLE_TO_DELETE_SECTION
BOOLEAN NTAPI MmFlushImageSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN MMFLUSH_TYPE FlushType)
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
SECTION_OBJECT_POINTERS SegmentObject
__volatile LONG FcbReference
PFCB_NONPAGED FcbNonpaged
#define STATUS_FILE_CORRUPT_ERROR
#define STATUS_INSUFFICIENT_RESOURCES
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
#define ObDereferenceObject