39 Irp = IrpContext->Irp;
44 Irp->IoStatus.Information = 0;
54 IrpContext->Irp =
NULL;
112 Irp = IrpContext->Irp;
113 Irp->IoStatus.Information = 0;
128 Irp->IoStatus.Information = 0;
140 Vcb->PartitionInformation.PartitionLength.QuadPart ) {
141 Irp->IoStatus.Information = 0;
154 if (
Ccb !=
NULL && !PagingIo) {
162 MainResourceAcquired =
TRUE;
174 MainResourceAcquired =
FALSE;
242 Irp = IrpContext->Irp;
250 if (MainResourceAcquired) {
254 if (!IrpContext->ExceptionInProgress) {
301#define SafeZeroMemory(AT,BYTE_COUNT) { \
304 RtlZeroMemory((AT), (BYTE_COUNT)); \
305 } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \
306 Ext2RaiseStatus( IrpContext, STATUS_INVALID_USER_BUFFER ); \
350 if (
S_ISLNK(
Mcb->Inode.i_mode) && 0 ==
Mcb->Inode.i_blocks) {
406 }
else if (
Extent->Offset > (Prev->Offset + Prev->Length)) {
518 Irp = IrpContext->Irp;
532 DEBUG(
DL_INF, (
"Ext2ReadFile: reading %wZ Off=%I64xh Len=%xh Paging=%xh Nocache=%xh\n",
547 Irp->IoStatus.Information = 0;
581 PagingIoResourceAcquired =
TRUE;
585 if (Nocache &&
Ccb !=
NULL &&
Fcb->SectionObject.DataSectionObject) {
593 MainResourceAcquired =
TRUE;
621 MainResourceAcquired =
TRUE;
625 &
Fcb->FileLockAnchor,
634 Irp->IoStatus.Information = 0;
765 Irp = IrpContext->Irp;
779 if (PagingIoResourceAcquired) {
783 if (MainResourceAcquired) {
788 if (!OpPostIrp && !IrpContext->ExceptionInProgress) {
825 DEBUG(
DL_IO, (
"Ext2ReadFile: %wZ fetch at Off=%I64xh Len=%xh Paging=%xh Nocache=%xh Returned=%xh Status=%xh\n",
845 Irp = IrpContext->Irp;
853 if (!IrpContext->ExceptionInProgress) {
882 bCompleteRequest =
FALSE;
890 bCompleteRequest =
TRUE;
898 bCompleteRequest =
TRUE;
909 bCompleteRequest =
TRUE;
919 bCompleteRequest =
FALSE;
925 bCompleteRequest =
TRUE;
930 bCompleteRequest =
FALSE;
932 DEBUG(
DL_ERR, (
"Ext2Read: Inavlid FileObject (Vcb or Fcb corrupted)\n"));
936 bCompleteRequest =
TRUE;
941 if (bCompleteRequest) {
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
VOID NTAPI CcMdlReadComplete(IN PFILE_OBJECT FileObject, IN PMDL MdlChain)
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 NTAPI CcFlushCache(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, OUT OPTIONAL PIO_STATUS_BLOCK IoStatus)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
#define IRP_CONTEXT_FLAG_WAIT
#define NT_SUCCESS(StatCode)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExAcquireResourceSharedLite(res, wait)
#define ClearFlag(_F, _SF)
#define VCB_VOLUME_LOCKED
#define IsSpecialFile(Fcb)
VOID Ext2OplockComplete(IN PVOID Context, IN PIRP Irp)
#define CCB_VOLUME_DASD_PURGE
#define IsFileDeleted(Mcb)
VOID Ext2DestroyExtentChain(IN PEXT2_EXTENT Chain)
#define EXT2_LINKLEN_IN_INODE
#define IsExt2FsDevice(DO)
NTSTATUS Ext2QueueRequest(IN PEXT2_IRP_CONTEXT IrpContext)
#define VCB_DISMOUNT_PENDING
#define Ext2NormalizeAndRaiseStatus(IRPCONTEXT, STATUS)
NTSTATUS Ext2BuildExtents(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONGLONG Offset, IN ULONG Size, IN BOOLEAN bAlloc, OUT PEXT2_EXTENT *Chain)
#define FCB_FILE_MODIFIED
VOID Ext2FreeIrpContext(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2LockUserBuffer(IN PIRP Irp, IN ULONG Length, IN LOCK_OPERATION Operation)
#define ClearLongFlag(_F, _SF)
#define Ext2DerefMcb(Mcb)
struct _EXT2_FCBVCB * PEXT2_FCBVCB
PVOID Ext2GetUserBuffer(IN PIRP Irp)
#define IsInodeSymLink(I)
#define Ext2CompleteRequest(Irp, bPrint, PriorityBoost)
struct _EXT2_VCB * PEXT2_VCB
#define IRP_CONTEXT_FLAG_REQUEUED
VOID Ext2LockIrp(IN PVOID Context, IN PIRP Irp)
struct _EXT2_CCB * PEXT2_CCB
struct _EXT2_FCB * PEXT2_FCB
NTSTATUS Ext2ReadWriteBlocks(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_EXTENT Extent, IN ULONG Length)
#define CEILING_ALIGNED(T, A, B)
#define Ext2ReferMcb(Mcb)
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
FAST_IO_POSSIBLE Ext2IsFastIoPossible(IN PEXT2_FCB Fcb)
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
BOOLEAN NTAPI FsRtlCheckLockForReadAccess(IN PFILE_LOCK FileLock, IN PIRP Irp)
#define READ_AHEAD_GRANULARITY
#define SafeZeroMemory(IC, AT, BYTE_COUNT)
NTSTATUS Ext2ReadComplete(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2Read(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2ReadInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONGLONG Offset, IN PVOID Buffer, IN ULONG Size, IN BOOLEAN bDirectIo, OUT PULONG BytesRead)
NTSTATUS Ext2ReadFile(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2CompleteIrpContext(IN PEXT2_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
NTSTATUS Ext2ReadVolume(IN PEXT2_IRP_CONTEXT IrpContext)
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 CcPurgeCacheSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN UninitializeCacheMaps)
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
#define FILE_USE_FILE_POINTER_POSITION
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
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)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
#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 STATUS_END_OF_FILE
struct _EXT2_EXTENT * Next
EXT2_IDENTIFIER Identifier
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
EXT2_IDENTIFIER_TYPE Type
ERESOURCE PagingIoResource
NTFSIDENTIFIER Identifier
FSRTL_ADVANCED_FCB_HEADER Header
struct _IO_STACK_LOCATION::@3974::@3978 Read
union _IO_STACK_LOCATION::@1575 Parameters
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_FILE_DELETED
#define STATUS_INVALID_USER_BUFFER
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
#define ExConvertExclusiveToShared
#define FO_FILE_FAST_IO_READ
#define IO_DISK_INCREMENT
#define FO_SYNCHRONOUS_IO