MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2QueryRetrievalPointers

Function Ext2QueryRetrievalPointers

Ext4Fsd/fsctl.c:771–905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771NTSTATUS
772Ext2QueryRetrievalPointers (
773 IN PEXT2_IRP_CONTEXT IrpContext
774)
775{
776 PIRP Irp = NULL;
777 PIO_STACK_LOCATION IrpSp;
778 PEXTENDED_IO_STACK_LOCATION EIrpSp;
779
780 PDEVICE_OBJECT DeviceObject;
781 PFILE_OBJECT FileObject;
782
783 PEXT2_VCB Vcb = NULL;
784 PEXT2_FCB Fcb = NULL;
785 PEXT2_CCB Ccb = NULL;
786
787 PLARGE_INTEGER RequestVbn;
788 PLARGE_INTEGER * pMappedRuns;
789
790 ULONG InputSize;
791 ULONG OutputSize;
792
793 NTSTATUS Status = STATUS_SUCCESS;
794
795 BOOLEAN FcbResourceAcquired = FALSE;
796
797 __try {
798
799 ASSERT(IrpContext);
800 Irp = IrpContext->Irp;
801 ASSERT(Irp);
802
803 IrpSp = IoGetCurrentIrpStackLocation(Irp);
804 EIrpSp = (PEXTENDED_IO_STACK_LOCATION)IrpSp;
805 ASSERT(IrpSp);
806
807 InputSize = EIrpSp->Parameters.FileSystemControl.InputBufferLength;
808 OutputSize = EIrpSp->Parameters.FileSystemControl.OutputBufferLength;
809
810 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
811 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
812
813 DeviceObject = IrpContext->DeviceObject;
814
815 DbgBreak();
816
817 /* This request is not allowed on the main device object */
818 if (IsExt2FsDevice(DeviceObject)) {
819 Status = STATUS_INVALID_DEVICE_REQUEST;
820 __leave;
821 }
822
823 Vcb = (PEXT2_VCB) DeviceObject->DeviceExtension;
824 ASSERT(Vcb != NULL);
825 ASSERT((Vcb->Identifier.Type == EXT2VCB) &&
826 (Vcb->Identifier.Size == sizeof(EXT2_VCB)));
827 ASSERT(IsMounted(Vcb));
828

Callers 1

Ext2UserFsRequestFunction · 0.85

Calls 3

Ext2QueryExtentMappingsFunction · 0.85
Ext2QueueRequestFunction · 0.85
Ext2CompleteIrpContextFunction · 0.85

Tested by

no test coverage detected