23#define BugCheckFileId (CDFS_BUG_CHECK_READ)
38#define SafeZeroMemory(IC,AT,BYTE_COUNT) { \
40 RtlZeroMemory( (AT), (BYTE_COUNT) ); \
41__pragma(warning(suppress: 6320)) \
42 } _SEH2_EXCEPT( EXCEPTION_EXECUTE_HANDLER ) { \
43 CdRaiseStatus( IC, STATUS_INVALID_USER_BUFFER ); \
47#define SafeZeroMemory(IC,AT,BYTE_COUNT) { \
49 RtlZeroMemory( (AT), (BYTE_COUNT) ); \
50 } _SEH2_EXCEPT( EXCEPTION_EXECUTE_HANDLER ) { \
51 CdRaiseStatus( IC, STATUS_INVALID_USER_BUFFER ); \
60#define READ_AHEAD_GRANULARITY (0x10000)
63#pragma alloc_text(PAGE, CdCommonRead)
112 ULONG OriginalByteCount;
217 if (!
Wait && NonCachedIo) {
244 (
PVOID)CdOplockComplete,
245 (
PVOID)CdPrePostIrp );
289 if (ByteRange >
Fcb->FileSize.QuadPart) {
292 ByteRange =
Fcb->FileSize.QuadPart;
313 (ReadByteCount > OriginalByteCount)) {
333 if (IrpContext->IoContext ==
NULL ||
343 IrpContext->IoContext = &LocalIoContext;
360 IrpContext->IoContext->AllocatedContext =
372 IrpContext->IoContext->Resource =
Fcb->Resource;
373 IrpContext->IoContext->RequestedByteCount =
ByteCount;
376 Irp->IoStatus.Information = ReadByteCount;
418 Irp->IoStatus.Information = 0;
561 Status = CdFsdPostRequest( IrpContext,
Irp );
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
VOID NTAPI CcMdlRead(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 CdCompleteRequest(_Inout_opt_ PIRP_CONTEXT IrpContext, _Inout_opt_ PIRP Irp, _In_ NTSTATUS Status)
#define CdMapUserBuffer(IC, UB)
#define CdAcquireFileSharedStarveExclusive(IC, F)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN TypeOfOpen
#define CdReleaseFile(IC, F)
#define CdGetFcbOplock(F)
_In_ PFCB _In_ LONGLONG StartingOffset
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
#define CdAllocateIoContext()
BOOLEAN CdVerifyFcbOperation(_In_opt_ PIRP_CONTEXT IrpContext, _In_ PFCB Fcb)
#define CdNormalizeAndRaiseStatus(IC, S)
#define CdAcquireFileShared(IC, F)
enum _TYPE_OF_OPEN TYPE_OF_OPEN
#define CdRaiseStatus(IC, S)
#define FCB_STATE_RAWSECTOR_MASK
#define CCB_FLAG_ALLOW_EXTENDED_DASD_IO
#define IRP_CONTEXT_FLAG_FORCE_POST
#define CCB_FLAG_DISMOUNT_ON_CLOSE
#define IRP_CONTEXT_FLAG_WAIT
#define IRP_CONTEXT_FLAG_ALLOC_IO
#define _Requires_lock_held_(lock)
#define _Analysis_suppress_lock_checking_(lock)
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION IrpSp
#define KeInitializeEvent(pEvt, foo, foo2)
#define ExGetCurrentResourceThread()
#define ClearFlag(_F, _SF)
#define BooleanFlagOn(F, SF)
BOOLEAN NTAPI FsRtlCheckLockForReadAccess(IN PFILE_LOCK FileLock, IN PIRP Irp)
#define READ_AHEAD_GRANULARITY
#define SafeZeroMemory(IC, AT, BYTE_COUNT)
VOID NTAPI CcInitializeCacheMap(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes, IN BOOLEAN PinAccess, IN PCACHE_MANAGER_CALLBACKS Callbacks, IN PVOID LazyWriteContext)
#define Add2Ptr(PTR, INC)
BOOLEAN NTAPI CcCopyRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus)
NTSTATUS NTAPI FsRtlNormalizeNtstatus(IN NTSTATUS NtStatusToNormalize, IN NTSTATUS NormalizedNtStatus)
#define STATUS_FILE_LOCK_CONFLICT
#define STATUS_UNEXPECTED_IO_ERROR
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 STATUS_END_OF_FILE
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
union _IO_STACK_LOCATION::@1575 Parameters
struct _IO_STACK_LOCATION::@3984::@3988 Read
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_DEVICE_REQUEST
_In_ WDFDPC _In_ BOOLEAN Wait
#define IoIsErrorUserInduced(Status)
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
#define FO_SYNCHRONOUS_IO