21#pragma alloc_text(PAGE, Ext2IsHandleCountZero)
22#pragma alloc_text(PAGE, Ext2LockVcb)
23#pragma alloc_text(PAGE, Ext2LockVolume)
24#pragma alloc_text(PAGE, Ext2UnlockVcb)
25#pragma alloc_text(PAGE, Ext2UnlockVolume)
26#pragma alloc_text(PAGE, Ext2AllowExtendedDasdIo)
27#pragma alloc_text(PAGE, Ext2GetRetrievalPointerBase)
28#pragma alloc_text(PAGE, Ext2QueryExtentMappings)
29#pragma alloc_text(PAGE, Ext2QueryRetrievalPointers)
30#pragma alloc_text(PAGE, Ext2GetRetrievalPointers)
31#pragma alloc_text(PAGE, Ext2UserFsRequest)
32#pragma alloc_text(PAGE, Ext2IsMediaWriteProtected)
33#pragma alloc_text(PAGE, Ext2MountVolume)
34#pragma alloc_text(PAGE, Ext2PurgeVolume)
35#pragma alloc_text(PAGE, Ext2PurgeFile)
36#pragma alloc_text(PAGE, Ext2DismountVolume)
37#pragma alloc_text(PAGE, Ext2IsVolumeMounted)
38#pragma alloc_text(PAGE, Ext2VerifyVolume)
39#pragma alloc_text(PAGE, Ext2FileSystemControl)
73 for (
List =
Vcb->FcbList.Flink;
82 DEBUG(
DL_INF, (
"Ext2IsHandleCountZero: Inode:%xh File:%S OpenHandleCount=%xh\n",
102 DEBUG(
DL_INF, (
"Ext2LockVolume: Volume is already locked.\n"));
108 DEBUG(
DL_INF, (
"Ext2LockVcb: There are still opened files.\n"));
115 DEBUG(
DL_INF, (
"Ext2LockVcb: Thare are still opened files.\n"));
174#if (_WIN32_WINNT >= 0x0500)
181 VcbResourceAcquired =
TRUE;
193 if (VcbResourceAcquired) {
197 if (!IrpContext->ExceptionInProgress) {
219 DEBUG(
DL_ERR, (
": Ext2UnlockVcb: Volume is not locked.\n"));
227 DEBUG(
DL_INF, (
"Ext2UnlockVcb: Volume unlocked.\n"));
276 VcbResourceAcquired =
TRUE;
282 if (VcbResourceAcquired) {
286 if (!IrpContext->ExceptionInProgress) {
308 ULONG InputLength = 0;
317 Irp = IrpContext->Irp;
335 Parameters.FileSystemControl.InputBufferLength;
339 if (IoIs32bitProcess(
Irp)) {
340 if (InputLength !=
sizeof(
UINT32)) {
348 if (InputLength !=
sizeof(
HANDLE)) {
370 GlobalResourceAcquired =
TRUE;
376 ListEntry = ListEntry->
Flink;
378 DEBUG(
DL_DBG, (
"Ext2InvalidateVolumes: Vcb=%xh Vcb->Vpb=%xh "
379 "Blink = %p &Vcb->Next = %p\n",
384 DEBUG(
DL_DBG, (
"Ext2InvalidateVolumes: Got Vcb=%xh Vcb->Vpb=%xh "
385 "Blink = %p &Vcb->Next = %p\n",
394 if (GlobalResourceAcquired) {
398 if (!IrpContext->ExceptionInProgress) {
469 ULONG OplockCount = 0;
478 Irp = IrpContext->Irp;
540 switch (FsCtrlCode) {
546 VcbResourceAcquired =
553 FcbResourceAcquired =
571 FcbResourceAcquired =
597 IrpContext->Irp =
NULL;
601 if (FcbResourceAcquired) {
605 if (VcbResourceAcquired) {
629 Irp = IrpContext->Irp;
637 if (
Irp->AssociatedIrp.SystemBuffer !=
NULL) {
641 }
else if (
Irp->MdlAddress !=
NULL) {
660 if (!IrpContext->ExceptionInProgress) {
693 while (Vbn < RequestVbn->
QuadPart) {
696 if (RequestVbn->QuadPart <
Vbn +
Length) {
728 if (PartialRuns ==
NULL) {
742 MappedRuns = PartialRuns;
754 *pMappedRuns = MappedRuns;
802 Irp = IrpContext->Irp;
860 OutputSize !=
sizeof(
PVOID)) {
870 FcbResourceAcquired =
TRUE;
873 pMappedRuns =
Irp->UserBuffer;
893 if (FcbResourceAcquired) {
947 Irp = IrpContext->Irp;
1011 FcbResourceAcquired =
TRUE;
1035 DEBUG(
DL_DBG, (
"Ext2GetRetrievalPointers: Startin from Vbn: %I64xh\n",
1044 while (Vbn < Fcb->
Header.AllocationSize.QuadPart) {
1071 DEBUG(
DL_MAP, (
"Ext2GetRetrievalPointers: %wZ %d Vbn = %I64xh Lbn = %I64xh\n",
1117 goto exit_to_get_rps;
1120 while (MappedRuns[_i*2 + 0].
QuadPart != 0 ||
1121 MappedRuns[_i*2 + 1].
QuadPart != 0 ) {
1122 DEBUG(
DL_MAP, (
"Ext2QueryExtentMappings: %wZ %d Vbn = %I64xh Lbn = %I64xh\n",
1139 if (FcbResourceAcquired) {
1186 Irp = IrpContext->Irp;
1248 FcbResourceAcquired =
TRUE;
1268 DEBUG(
DL_DBG, (
"Ext2GetRetrievalPointerBase: FileAreaOffset is 0.\n"));
1276 if (FcbResourceAcquired) {
1310 if (InputBufferLength < RDB->ReparseDataLength) {
1320 if ((
PUCHAR)RDB->SymbolicLinkReparseBuffer.PathBuffer
1321 + RDB->SymbolicLinkReparseBuffer.SubstituteNameOffset
1322 + RDB->SymbolicLinkReparseBuffer.SubstituteNameLength
1328 if ((
PUCHAR)RDB->SymbolicLinkReparseBuffer.PathBuffer
1329 + RDB->SymbolicLinkReparseBuffer.PrintNameOffset
1330 + RDB->SymbolicLinkReparseBuffer.PrintNameLength
1353 PathBufferLength *
sizeof(
WCHAR);
1355 RDB->SymbolicLinkReparseBuffer.SubstituteNameOffset = PathBufferLength;
1356 RDB->SymbolicLinkReparseBuffer.SubstituteNameLength = PathBufferLength;
1357 RDB->SymbolicLinkReparseBuffer.PrintNameOffset = 0;
1358 RDB->SymbolicLinkReparseBuffer.PrintNameLength = PathBufferLength;
1360 RtlZeroMemory(&RDB->SymbolicLinkReparseBuffer.PathBuffer, PathBufferLength * 2);
1411 int OemNameLength = 0,
i;
1413 Ccb = IrpContext->Ccb;
1419 Mcb = IrpContext->Fcb->Mcb;
1420 Irp = IrpContext->Irp;
1444 OemNameLength = (
ULONG)
Mcb->Inode.i_size;
1450 OemName.MaximumLength = OemNameLength + 1;
1454 if (!OemNameBuffer) {
1501 if (OemNameBuffer) {
1534 if (0 ==
Mcb->Inode.i_blocks) {
1550 if (
Mcb->Inode.i_blocks) {
1599 int OemNameLength = 0,
i;
1606 Ccb = IrpContext->Ccb;
1614 Irp = IrpContext->Irp;
1618 FcbLockAcquired =
TRUE;
1620 ParentMcb =
Mcb->Parent;
1632 if (FcbLockAcquired) {
1634 FcbLockAcquired =
FALSE;
1643 MainResourceAcquired =
TRUE;
1666 OemName.MaximumLength = OemNameLength + 1;
1670 if (!OemNameBuffer) {
1712 if (FcbLockAcquired) {
1714 FcbLockAcquired =
FALSE;
1717 if (MainResourceAcquired) {
1721 if (OemNameBuffer) {
1763 if (len < EXT2_LINKLEN_IN_INODE && !Mcb->Inode.i_blocks) {
1806 Ccb = IrpContext->Ccb;
1812 Mcb = IrpContext->Fcb->Mcb;
1813 Irp = IrpContext->Irp;
1816 FcbLockAcquired =
TRUE;
1818 ParentMcb =
Mcb->Parent;
1841 if (FcbLockAcquired) {
1843 FcbLockAcquired =
FALSE;
1852 MainResourceAcquired =
TRUE;
1864 if (FcbLockAcquired) {
1868 if (MainResourceAcquired) {
1915 Irp = IrpContext->Irp;
1923 IoStackLocation)->Parameters.FileSystemControl.FsControlCode;
1960#if (_WIN32_WINNT >= 0x0500)
2094 *((
PULONG)IrpContext->RealDevice->DeviceExtension) ==
'DSSA') {
2101 Irp = IrpContext->Irp;
2126 &VolumeDeviceObject );
2135 VolumeDeviceObject->DeviceObjectExtension->PowerControlNeeded =
FALSE;
2170 Vcb->DiskGeometry = DiskGeometry;
2183 DEBUG(
DL_INF, (
"Volume of ext2 file system is found.\n"));
2190 DEBUG(
DL_DBG, (
"Ext2MountVolume: DevObject=%p Vcb=%p\n", VolumeDeviceObject,
Vcb));
2195 VolumeDeviceObject,
Vpb);
2202 GlobalDataResourceAcquired =
TRUE;
2209 OldVpb = OldVcb->Vpb;
2212 if (OldVpb ==
Vpb) {
2221 &
Vpb->VolumeLabel[0],
2222 Vpb->VolumeLabelLength)) &&
2224 &
Vcb->SuperBlock->s_uuid[0], 16)) ) {
2243 if (GlobalDataResourceAcquired) {
2261 if (VolumeDeviceObject) {
2268 if (!IrpContext->ExceptionInProgress) {
2283 ULONG ChangeCount = 0;
2296 Irp = IrpContext->Irp;
2304 dwBytes =
sizeof(
ULONG);
2306 Vcb->TargetDeviceObject,
2317 (ChangeCount !=
Vcb->ChangeCount))) {
2322 if (
Vcb->Vpb ==
Vcb->Vpb->RealDevice->Vpb) {
2358 if (
Vcb->Vpb ==
Vcb->Vpb->RealDevice->Vpb) {
2386 ULONG ChangeCount = 0;
2409 VcbResourceAcquired =
2424 dwBytes =
sizeof(
ULONG);
2426 Vcb->TargetDeviceObject,
2438 Vcb->ChangeCount = ChangeCount;
2441 Irp = IrpContext->Irp;
2462 DEBUG(
DL_INF, (
"Ext2VerifyVolume: Volume verify succeeded.\n"));
2472 DEBUG(
DL_INF, (
"Ext2VerifyVolume: Volume verify failed.\n"));
2480 if (VcbResourceAcquired) {
2484 if (!IrpContext->ExceptionInProgress) {
2558 VcbResourceAcquired =
TRUE;
2569 VcbResourceAcquired =
FALSE;
2574 DEBUG(
DL_INF, (
"Ext2Dismount: Volume dismount pending.\n"));
2579 if (VcbResourceAcquired) {
2583 if (!IrpContext->ExceptionInProgress) {
2600 ULONG UnCleanCount = 0;
2603 if (NewVpb ==
NULL) {
2604 DEBUG(
DL_ERR, (
"Ex2CheckDismount: failed to allocate NewVpb.\n"));
2607 DEBUG(
DL_DBG, (
"Ext2CheckDismount: NewVpb allocated: %p\n", NewVpb));
2620 IrpContext->RealDevice ==
Vcb->RealDevice) {
2628 DEBUG(
DL_DBG, (
"Ext2CheckDismount: Vpb %p ioctl=%d Device %p\n",
2629 Vpb,
Vpb->ReferenceCount,
Vpb->RealDevice));
2631 if (
Vpb->ReferenceCount <= UnCleanCount) {
2638 if ((
Vcb->RealDevice !=
Vpb->RealDevice) &&
2639 (
Vcb->RealDevice->Vpb ==
Vpb)) {
2648 if (
Vpb->ReferenceCount) {
2655 DEBUG(
DL_DBG, (
"Ext2CheckDismount: Vpb: %p bDeleted=%d bTearDown=%d\n",
2656 Vpb, bDeleted, bTearDown));
2659 }
else if (bForce) {
2661 DEBUG(
DL_DBG, (
"Ext2CheckDismount: New/Old Vpb %p/%p Realdevice = %p\n",
2662 NewVpb,
Vcb->Vpb,
Vpb->RealDevice));
2669 NewVpb->Size =
sizeof(
VPB);
2671 NewVpb->RealDevice =
Vpb->RealDevice;
2672 NewVpb->RealDevice->
Vpb = NewVpb;
2685 DEBUG(
DL_DBG, (
"Ext2CheckDismount: Tearing vcb %p ...\n",
Vcb));
2690 DEBUG(
DL_DBG, (
"Ext2CheckDismount: Deleting vcb %p ...\n",
Vcb));
2694 if (NewVpb !=
NULL) {
2695 DEBUG(
DL_DBG, (
"Ext2CheckDismount: freeing new Vpb %p\n", NewVpb));
2721 VcbResourceAcquired =
TRUE;
2724 FlushBeforePurge =
FALSE;
2730 FcbResourceAcquired =
TRUE;
2737 DEBUG(
DL_INF, (
"Ext2PurgeVolume: %wZ refercount=%xh\n",
2738 &
Fcb->
Mcb->FullName,
Fcb->ReferenceCount));
2753 if (
Fcb->ReferenceCount <= 1) {
2754 Fcb->TsDrop.QuadPart = 0;
2763 if (FcbResourceAcquired) {
2765 FcbResourceAcquired =
FALSE;
2770 gdResourceAcquired =
TRUE;
2775 if (FlushBeforePurge) {
2782 if (
Vcb->SectionObject.ImageSectionObject) {
2786 if (
Vcb->SectionObject.DataSectionObject) {
2790 DEBUG(
DL_INF, (
"Ext2PurgeVolume: Volume flushed and purged.\n"));
2794 if (gdResourceAcquired) {
2798 if (FcbResourceAcquired) {
2802 if (VcbResourceAcquired) {
2823 DEBUG(
DL_INF, (
"Ext2PurgeFile: CcFlushCache on %wZ.\n",
2831 if (
Fcb->SectionObject.ImageSectionObject) {
2832 DEBUG(
DL_INF, (
"Ext2PurgeFile: MmFlushImageSection on %wZ.\n",
2837 if (
Fcb->SectionObject.DataSectionObject) {
2838 DEBUG(
DL_INF, (
"Ext2PurgeFile: CcPurgeCacheSection on %wZ.\n",
2857 switch (IrpContext->MinorFunction) {
2873 DEBUG(
DL_ERR, (
"Ext2FilsSystemControl: Invalid Device Request.\n"));
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define STATUS_PRIVILEGE_NOT_HELD
static PDEVICE_OBJECT MainDeviceObject
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
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 IOCTL_DISK_CHECK_VERIFY
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
#define IOCTL_DISK_IS_WRITABLE
#define IRP_CONTEXT_FLAG_WAIT
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION IrpSp
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB ParentDcb
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define ExAcquireResourceExclusiveLite(res, wait)
#define DO_DEVICE_INITIALIZING
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define ExAcquireResourceSharedLite(res, wait)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
NTSTATUS Ext2UnlockVolume(IN PEXT2_IRP_CONTEXT IrpContext)
BOOLEAN Ext2IsHandleCountZero(IN PEXT2_VCB Vcb)
NTSTATUS Ext2QueryRetrievalPointers(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2InspectReparseData(IN PREPARSE_DATA_BUFFER RDB, IN ULONG InputBufferLength)
NTSTATUS Ext2UnlockVcb(IN PEXT2_VCB Vcb, IN PFILE_OBJECT FileObject)
NTSTATUS Ext2OplockRequest(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2QueryExtentMappings(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Fcb, IN PLARGE_INTEGER RequestVbn, OUT PLARGE_INTEGER *pMappedRuns)
NTSTATUS Ext2PurgeVolume(IN PEXT2_VCB Vcb, IN BOOLEAN FlushBeforePurge)
BOOLEAN Ext2IsMediaWriteProtected(IN PEXT2_IRP_CONTEXT IrpContext, IN PDEVICE_OBJECT TargetDevice)
NTSTATUS Ext2VerifyVolume(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2DeleteReparsePoint(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2TruncateSymlink(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, ULONG Size)
BOOLEAN Ext2CheckDismount(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bForce)
NTSTATUS Ext2AllowExtendedDasdIo(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2GetRetrievalPointers(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2WriteSymlink(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN PVOID Buffer, IN ULONG Size, OUT PULONG BytesWritten)
VOID Ext2ClearVpbFlag(IN PVPB Vpb, IN USHORT Flag)
NTSTATUS Ext2ReadSymlink(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN PVOID Buffer, IN ULONG Size, OUT PULONG BytesRead)
NTSTATUS Ext2LockVcb(IN PEXT2_VCB Vcb, IN PFILE_OBJECT FileObject)
NTSTATUS Ext2DismountVolume(IN PEXT2_IRP_CONTEXT IrpContext)
VOID Ext2VerifyVcb(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
NTSTATUS Ext2FileSystemControl(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2GetRetrievalPointerBase(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2GetReparsePoint(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2UserFsRequest(IN PEXT2_IRP_CONTEXT IrpContext)
VOID Ext2SetVpbFlag(IN PVPB Vpb, IN USHORT Flag)
NTSTATUS Ext2InvalidateVolumes(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2IsVolumeMounted(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2MountVolume(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2LockVolume(IN PEXT2_IRP_CONTEXT IrpContext)
VOID Ext2InitializeReparseData(IN PREPARSE_DATA_BUFFER RDB, USHORT PathBufferLength)
NTSTATUS Ext2PurgeFile(IN PEXT2_FCB Fcb, IN BOOLEAN FlushBeforePurge)
NTSTATUS Ext2IsVolumeDirty(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2SetReparsePoint(IN PEXT2_IRP_CONTEXT IrpContext)
BOOLEAN Ext2ReadInode(PEXT2_VOLUME_INFO Volume, ULONG Inode, PEXT2_INODE InodeBuffer)
VOID Ext2FreePool(IN PVOID P, IN ULONG Tag)
#define ClearFlag(_F, _SF)
#define VCB_VOLUME_LOCKED
#define VCB_WRITE_PROTECTED
VOID Ext2JointExtents(IN PEXT2_EXTENT Chain, IN PEXT2_EXTENT Extent)
VOID Ext2RemoveVcb(PEXT2_VCB Vcb)
VOID Ext2ReleaseFcb(IN PEXT2_FCB Fcb)
#define Ext2RaiseStatus(IRPCONTEXT, STATUS)
#define VCB_REMOVABLE_MEDIA
PVOID Ext2AllocatePool(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
#define IsVcbReadOnly(Vcb)
NTSTATUS Ext2TruncateFile(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER AllocationSize)
VOID Ext2DestroyExtentChain(IN PEXT2_EXTENT Chain)
struct _EXT2_VCB EXT2_VCB
VOID Ext2TearDownStream(IN PEXT2_VCB Vcb)
BOOLEAN Ext2SaveInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN struct inode *Inode)
#define EXT2_LINKLEN_IN_INODE
#define IsExt2FsDevice(DO)
NTSTATUS Ext2QueueRequest(IN PEXT2_IRP_CONTEXT IrpContext)
#define CCB_OPEN_REPARSE_POINT
#define DEC_MEM_COUNT(_i, _p, _s)
#define SetLongFlag(_F, _SF)
NTSTATUS Ext2OEMToUnicode(IN PEXT2_VCB Vcb, IN OUT PUNICODE_STRING Oem, IN POEM_STRING Unicode)
#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
ULONG Ext2UnicodeToOEMSize(IN PEXT2_VCB Vcb, IN PUNICODE_STRING Unicode)
#define ClearLongFlag(_F, _SF)
#define Ext2BugCheck(A, B, C, D)
void ext3_dec_count(struct inode *inode)
VOID Ext2DestroyVcb(IN PEXT2_VCB Vcb)
NTSTATUS Ext2InitializeVcb(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_SUPER_BLOCK Ext2Sb, PDEVICE_OBJECT TargetDevice, PDEVICE_OBJECT VolumeDevice, PVPB Vpb)
PVOID Ext2GetUserBuffer(IN PIRP Irp)
VOID Ext2NotifyReportChange(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Filter, IN ULONG Action)
#define IsInodeSymLink(I)
NTSTATUS Ext2SetFileType(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN PEXT2_MCB Mcb, IN umode_t mode)
#define EXT2_UNLOAD_PENDING
struct _EXT2_VCB * PEXT2_VCB
ULONG Ext2CountExtents(IN PEXT2_EXTENT Chain)
NTSTATUS Ext2UnicodeToOEM(IN PEXT2_VCB Vcb, IN OUT POEM_STRING Oem, IN PUNICODE_STRING Unicode)
#define FSCTL_GET_RETRIEVAL_POINTER_BASE
#define CCB_DELETE_ON_CLOSE
NTSTATUS Ext2UpdateGroupDirStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Group)
NTSTATUS Ext2LoadSuper(IN PEXT2_VCB Vcb, IN BOOLEAN bVerify, OUT PEXT2_SUPER_BLOCK *Sb)
struct _EXT2_CCB * PEXT2_CCB
struct _EXT2_FCB * PEXT2_FCB
VOID Ext2DropBH(IN PEXT2_VCB Vcb)
ULONG Ext2OEMToUnicodeSize(IN PEXT2_VCB Vcb, IN PANSI_STRING Oem)
VOID Ext2InsertVcb(PEXT2_VCB Vcb)
NTSTATUS Ext2DiskIoControl(IN PDEVICE_OBJECT DeviceOjbect, IN ULONG IoctlCode, IN PVOID InputBuffer, IN ULONG InputBufferSize, IN OUT PVOID OutputBuffer, IN OUT PULONG OutputBufferSize)
NTSTATUS Ext2CompleteIrpContext(IN PEXT2_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
#define CCB_ALLOW_EXTENDED_DASD_IO
NTSTATUS Ext2FlushFiles(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
#define INC_MEM_COUNT(_i, _p, _s)
PEXT2_FCB Ext2AllocateFcb(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
NTSTATUS Ext2WriteInode(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 dwReturn)
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
#define EXT2_BUGCHK_FSCTL
FAST_IO_POSSIBLE Ext2IsFastIoPossible(IN PEXT2_FCB Fcb)
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
IN PVCB IN FAT_VOLUME_STATE VolumeState
IN PDCB IN POEM_STRING OemName
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG FsControlCode
_Must_inspect_result_ _In_ USHORT NewSize
#define FsRtlAreThereCurrentFileLocks(FL)
BOOLEAN NTAPI CcPurgeCacheSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN UninitializeCacheMaps)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define EXCEPTION_EXECUTE_HANDLER
POBJECT_TYPE IoFileObjectType
#define RtlEqualMemory(dst, src, len)
#define REPARSE_DATA_BUFFER_HEADER_SIZE
NTSTATUS NTAPI CcWaitForCurrentLazyWriterActivity(VOID)
#define ExFreePoolWithTag(_P, _T)
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
#define FSCTL_QUERY_RETRIEVAL_POINTERS
#define FSCTL_OPLOCK_BREAK_NOTIFY
#define FSCTL_LOCK_VOLUME
#define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE
#define FSCTL_REQUEST_OPLOCK_LEVEL_1
#define FSCTL_MARK_VOLUME_DIRTY
#define FSCTL_INVALIDATE_VOLUMES
#define FSCTL_UNLOCK_VOLUME
#define FSCTL_REQUEST_BATCH_OPLOCK
#define FSCTL_OPBATCH_ACK_CLOSE_PENDING
#define FSCTL_OPLOCK_BREAK_ACK_NO_2
#define FSCTL_IS_VOLUME_MOUNTED
#define FSCTL_REQUEST_OPLOCK_LEVEL_2
#define FSCTL_DISMOUNT_VOLUME
struct _DISK_GEOMETRY DISK_GEOMETRY
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define FILE_ATTRIBUTE_REPARSE_POINT
#define VPB_REMOVE_PENDING
BOOLEAN NTAPI ExAcquireSharedStarveExclusive(IN PERESOURCE Resource, IN BOOLEAN Wait)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
VOID NTAPI IoSetHardErrorOrVerifyDevice(IN PIRP Irp, IN PDEVICE_OBJECT DeviceObject)
VOID NTAPI IoReleaseVpbSpinLock(IN KIRQL Irql)
VOID NTAPI IoAcquireVpbSpinLock(OUT PKIRQL Irql)
BOOLEAN NTAPI SeSinglePrivilegeCheck(_In_ LUID PrivilegeValue, _In_ KPROCESSOR_MODE PreviousMode)
Checks if a single privilege is present in the context of the calling thread.
#define STATUS_VOLUME_DISMOUNTED
#define STATUS_NOT_A_REPARSE_POINT
#define STATUS_NOT_LOCKED
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
NTSTATUS NTAPI FsRtlOplockFsctrl(IN POPLOCK Oplock, IN PIRP Irp, IN ULONG OpenCount)
#define FILE_DEVICE_DISK_FILE_SYSTEM
#define FSCTL_GET_REPARSE_POINT
#define FSCTL_SET_REPARSE_POINT
struct STARTING_VCN_INPUT_BUFFER * PSTARTING_VCN_INPUT_BUFFER
#define FSCTL_IS_VOLUME_DIRTY
#define FSCTL_GET_RETRIEVAL_POINTERS
#define FSCTL_DELETE_REPARSE_POINT
#define _SEH2_AbnormalTermination()
#define _SEH2_EXCEPT(...)
#define IRP_MJ_SET_INFORMATION
#define FSCTL_ALLOW_EXTENDED_DASD_IO
BOOLEAN NTAPI MmFlushImageSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN MMFLUSH_TYPE FlushType)
#define STATUS_DEVICE_NOT_READY
#define STATUS_END_OF_FILE
#define SYMLINK_FLAG_RELATIVE
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
struct _REPARSE_DATA_BUFFER * PREPARSE_DATA_BUFFER
LARGE_INTEGER StartingVcn
struct RETRIEVAL_POINTERS_BUFFER::@3331 Extents[1]
ERESOURCE PagingIoResource
NTFSIDENTIFIER Identifier
struct _FCB::@734::@737 Fcb
FSRTL_ADVANCED_FCB_HEADER Header
struct _IO_STACK_LOCATION::@3983::@3998 FileSystemControl
struct _IO_STACK_LOCATION::@3983::@4003 MountVolume
PDEVICE_OBJECT DeviceObject
union _IO_STACK_LOCATION::@1584 Parameters
struct _LIST_ENTRY * Blink
struct _LIST_ENTRY * Flink
struct _REPARSE_DATA_BUFFER::@313::@315 SymbolicLinkReparseBuffer
USHORT SubstituteNameOffset
WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH/sizeof(WCHAR)]
struct _DEVICE_OBJECT * RealDevice
#define FIELD_OFFSET(t, f)
union _LARGE_INTEGER LARGE_INTEGER
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
union _LARGE_INTEGER * PLARGE_INTEGER
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_MEDIA_WRITE_PROTECTED
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNRECOGNIZED_VOLUME
#define STATUS_UNSUCCESSFUL
#define STATUS_WRONG_VOLUME
#define STATUS_NO_MEDIA_IN_DEVICE
#define STATUS_FILE_DELETED
#define STATUS_INVALID_USER_BUFFER
#define STATUS_VERIFY_REQUIRED
#define STATUS_INSUFFICIENT_RESOURCES
#define PEXTENDED_IO_STACK_LOCATION
BOOL Privilege(LPTSTR pszPrivilege, BOOL bEnable)
_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_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_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 BytesWritten
_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
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
_Must_inspect_result_ _In_ WDFCMRESLIST List
_Must_inspect_result_ _In_ ULONG Flags
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
#define SL_OVERRIDE_VERIFY_VOLUME
#define FILE_ACTION_MODIFIED
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MJ_SET_VOLUME_INFORMATION
#define IRP_MN_VERIFY_VOLUME
#define FILE_NOTIFY_CHANGE_ATTRIBUTES
#define IRP_MN_USER_FS_REQUEST
#define IRP_MJ_FLUSH_BUFFERS
#define IO_REPARSE_TAG_SYMLINK
#define IRP_MN_MOUNT_VOLUME
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
#define MmGetSystemAddressForMdl(Mdl)
#define ObDereferenceObject