21#pragma alloc_text(PAGE, Ext2AllocateInode)
22#pragma alloc_text(PAGE, Ext2DestroyInode)
23#pragma alloc_text(PAGE, Ext2CheckBitmapConsistency)
24#pragma alloc_text(PAGE, Ext2CheckSetBlock)
25#pragma alloc_text(PAGE, Ext2InitializeVcb)
26#pragma alloc_text(PAGE, Ext2TearDownStream)
27#pragma alloc_text(PAGE, Ext2DestroyVcb)
28#pragma alloc_text(PAGE, Ext2SyncUninitializeCacheMap)
29#pragma alloc_text(PAGE, Ext2ReaperThread)
30#pragma alloc_text(PAGE, Ext2StartReaper)
31#pragma alloc_text(PAGE, Ext2StopReaper)
47 ExAllocateFromNPagedLookasideList(
50 if (IrpContext ==
NULL) {
72 if (
irpSp->Parameters.MountVolume.Vpb) {
122 IrpContext->Identifier.Type = 0;
123 IrpContext->Identifier.Size = 0;
151#ifndef _WIN2K_TARGET_
158 &
Fcb->FileLockAnchor,
163 Fcb->ReferenceCount = 0;
172 DEBUG(
DL_RES, (
"Ext2AllocateFcb: Fcb %p created: %wZ.\n",
183 Fcb->
Header.ValidDataLength.QuadPart =
Mcb->Inode.i_size;
187 Fcb->SectionObject.DataSectionObject =
NULL;
188 Fcb->SectionObject.SharedCacheMap =
NULL;
189 Fcb->SectionObject.ImageSectionObject =
NULL;
210 DEBUG(
DL_INF, (
"Ext2FreeFcb: Fcb (%p) to be unlinked: %wZ.\n",
250#ifndef _WIN2K_TARGET_
293 Fcb->TsDrop.QuadPart = 0;
338 Ccb->SymLink = SymLink;
342 DEBUG(
DL_INF, (
"ExtAllocateCcb: Ccb SymLink: %wZ.\n",
343 &
Ccb->SymLink->FullName));
346 Ccb->DirectorySearchPattern.Length = 0;
347 Ccb->DirectorySearchPattern.MaximumLength = 0;
348 Ccb->DirectorySearchPattern.Buffer = 0;
365 DEBUG(
DL_INF, (
"Ext2FreeCcb: Ccb SymLink: %wZ.\n",
366 &
Ccb->SymLink->FullName));
376 if (
Ccb->DirectorySearchPattern.Buffer !=
NULL) {
378 Ccb->DirectorySearchPattern.MaximumLength );
391 inode = ExAllocateFromNPagedLookasideList(
392 &(
Vcb->InodeLookasideList));
412 ExFreeToNPagedLookasideList(&(
Vcb->InodeLookasideList),
inode);
420 de = (
struct dentry *)ExAllocateFromNPagedLookasideList(
454 DEBUG(
DL_ERR, (
"Ext2BuildEntry: failed to allocate dentry.\n"));
464 DEBUG(
DL_ERR, (
"Ex2BuildEntry: failed to allocate OEM name.\n"));
467 de->
d_name.name = Oem.Buffer;
474 de->
d_name.len = Oem.Length;
568 Extents,
i, &DirtyVba,
569 &DirtyLba, &DirtyLength);
i++) {
570 if (DirtyVba > 0 && DirtyLba != -1) {
571 DEBUG(
DL_EXT, (
"Vba:%I64xh Lba:%I64xh Len:%I64xh.\n", DirtyVba, DirtyLba, DirtyLength));
608 if (!bAdded && (!bFound || DirtyLbn == -1)) {
612 if ( !bFound || (DirtyLbn == -1) ||
629 DEBUG(
DL_EXT, (
"Index = %xh Vbn = %I64xh Lbn = %I64xh Len = %I64xh\n",
654 ULONG TriedTimes = 0;
661 ~(
Vcb->IoUnitSize - 1);
683 if (!rc && ++TriedTimes < 10) {
688 DEBUG(
DL_EXT, (
"Ext2AddVcbExtent: Vbn=%I64xh Length=%I64xh,"
706 ULONG TriedTimes = 0;
732 if (!rc && ++TriedTimes < 10) {
737 DEBUG(
DL_EXT, (
"Ext2RemoveVcbExtent: Vbn=%I64xh Length=%I64xh Runs=%u\n",
773 if (
Lbn && ((*
Lbn) != -1)) {
775 (*Lbn) = (((*Lbn) - 1) <<
Vcb->IoUnitBits);
776 (*Lbn) += ((
Vbn) & (
Vcb->IoUnitSize - 1));
780 (*Length) <<=
Vcb->IoUnitBits;
781 (*Length) -= ((
Vbn) & (
Vcb->IoUnitSize - 1));
798 ULONG TriedTimes = 0;
831 if (!rc && ++TriedTimes < 10) {
836 DEBUG(
DL_EXT, (
"Ext2AddMcbExtent: Vbn=%I64xh Lbn=%I64xh Length=%I64xh,"
855 ULONG TriedTimes = 0;
882 if (!rc && ++TriedTimes < 10) {
887 DEBUG(
DL_EXT, (
"Ext2RemoveMcbExtent: Vbn=%I64xh Length=%I64xh Runs=%u\n",
924 if (
Lbn && ((*
Lbn) != -1)) {
948 ULONG TriedTimes = 0;
969 if (!rc && ++TriedTimes < 10) {
974 DEBUG(
DL_EXT, (
"Ext2AddMcbMetaExts: Block: %xh-%xh rc=%d Runs=%u\n", Block,
992 ULONG TriedTimes = 0;
1011 if (!rc && ++TriedTimes < 10) {
1016 DEBUG(
DL_EXT, (
"Ext2RemoveMcbMetaExts: Block: %xh-%xhh Runs=%u\n", Block,
1045 ULONG _block = 0, _mapped = 0;
1047 if (_rc && _block != 0 && (_block != Block)) {
1140 while (
Start < End) {
1185 DEBUG(
DL_MAP, (
"Ext2InitializeZone %wZ: Block = %xh Mapped = %xh\n",
1186 &
Mcb->FullName, Block, Mapped));
1233 if ((IrpContext && IrpContext->Irp) &&
1381 if (
Parent->Buffer[ParentLen - 1] ==
L'\\') {
1394 Length += (ParentLen + (bBackslash ? 1 : 0)) *
sizeof(
WCHAR);
1403 DEBUG(
DL_ERR, (
"Ex2BuildName: failed to allocate name bufer.\n"));
1411 ParentLen *
sizeof(
WCHAR));
1415 Target->Buffer[ParentLen++] =
L'\\';
1460 Mcb->Inode.i_sb = &
Vcb->sb;
1468 DEBUG(
DL_RES, (
"Ext2AllocateMcb: Root Mcb is to be created !\n"));
1511 DEBUG(
DL_INF, (
"Ext2AllocateMcb: Mcb %wZ created.\n", &
Mcb->FullName));
1519 if (
Mcb->ShortName.Buffer) {
1521 Mcb->ShortName.MaximumLength);
1525 if (
Mcb->FullName.Buffer) {
1527 Mcb->FullName.MaximumLength);
1554 DEBUG(
DL_INF, (
"Ext2FreeMcb: Mcb %wZ will be freed.\n", &
Mcb->FullName));
1572 if (
Mcb->ShortName.Buffer) {
1574 Mcb->ShortName.MaximumLength);
1578 if (
Mcb->FullName.Buffer) {
1580 Mcb->FullName.MaximumLength);
1589 Mcb->Identifier.Type = 0;
1590 Mcb->Identifier.Size = 0;
1609 LockAcquired =
TRUE;
1655 TmpMcb =
Parent->Target->Child;
1674 TmpMcb = TmpMcb->
Next;
1700 LockAcquired =
TRUE;
1718 DEBUG(
DL_ERR, (
"Ext2InsertMcb: Child Mcb is alreay attached.\n"));
1721 DEBUG(
DL_ERR, (
"Ext2InsertMcb: Child Mcb's flag isn't set.\n"));
1758 LockAcquired =
TRUE;
1762 if (
Mcb->Parent->Child ==
Mcb) {
1763 Mcb->Parent->Child =
Mcb->Next;
1766 TmpMcb =
Mcb->Parent->Child;
1768 while (TmpMcb && TmpMcb->
Next !=
Mcb) {
1769 TmpMcb = TmpMcb->
Next;
1783 &
Mcb->FullName,
Mcb->Parent, &
Mcb->Parent->FullName));
1820 LockAcquired =
TRUE;
1866 if (
group ==
Vcb->sbi.s_groups_count - 1) {
1895 return (!bModified);
1903 for (
i = 0;
i <
Vcb->sbi.s_groups_count;
i++) {
1915 if (
i ==
Vcb->sbi.s_groups_count - 1) {
1917 Vcb->InodeSize +
Vcb->BlockSize - 1) /
1921 Vcb->BlockSize - 1) / (
Vcb->BlockSize);
1924 for (
j = 0;
j < InodeBlocks;
j++ )
1968 for (
i=0;
i < 16;
i++) {
1972 }
else if (
i == 15) {
1983 if (
NULL == UniBuffer) {
1996 UniName.
Buffer = UniBuffer;
2034 WCHAR wUID[8], wGID[8], wEUID[8], wEGID[8];
2035 CHAR sUID[8], sGID[8], sEUID[8], sEGID[8];
2038 bCheckBitmap =
FALSE,
2040 bMountPoint =
FALSE;
2041 BOOLEAN bUID = 0, bGID = 0, bEUID = 0, bEGID = 0;
2049 } ParamPattern[] = {
2064 &Suffix[0],
Property->sHidingSuffix},
2066 &MountPoint[0], &DrvLetter[0]},
2068 {
UID, &bUID, 8, &wUID[0], &sUID[0],},
2069 {
GID, &bGID, 8, &wGID[0], &sGID[0]},
2070 {
EUID, &bEUID, 8, &wEUID[0], &sEUID[0]},
2071 {
EGID, &bEGID, 8, &wEGID[0], &sEGID[0]},
2095 for (
i=0; ParamPattern[
i].Name !=
NULL;
i++) {
2099 *ParamPattern[
i].bExist =
FALSE;
2111 *(ParamPattern[
i].bExist) =
TRUE;
2116 while (
j + k < Params->
Length/2 &&
2121 ParamPattern[
i].uValue[
k] =
Params->Buffer[
j +
k];
2124 ParamPattern[
i].uValue[
k] =
Params->Buffer[
j +
k++];
2132 AnsiName.
Buffer = ParamPattern[
i].aValue;
2139 *(ParamPattern[
i].bExist) =
TRUE;
2141 *ParamPattern[
i].bExist =
FALSE;
2151 Property->DrvLetter = DrvLetter[0];
2157 sUID[7] = sGID[7] = sEUID[7] = sEGID[7] = 0;
2198 if (
Vcb->IsExt3fs) {
2245 if (VolumeParams.
Buffer) {
2266 Label.Buffer =
Vcb->Vpb->VolumeLabel;
2267 Vcb->Vpb->VolumeLabelLength = 0;
2272 ((Sb->s_volume_name[
Length -1] == 0x00) ||
2273 (Sb->s_volume_name[
Length - 1] == 0x20) )
2282 OemName.Buffer = Sb->s_volume_name;
2288 Vcb->Vpb->VolumeLabelLength =
Label.Length;
2297 for (
i = 0;
i < 16;
i++) {
2306#define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
2322 ULONG ChangeCount = 0, features;
2324 int i, has_huge_files;
2367 Vcb->IoUnitSize =
Vcb->BlockSize;
2373 Vcb->Header.Resource = &(
Vcb->MainResource);
2374 Vcb->Header.PagingIoResource = &(
Vcb->PagingIoResource);
2375 Vcb->OpenVolumeCount = 0;
2376 Vcb->OpenHandleCount = 0;
2377 Vcb->ReferenceCount = 0;
2387#ifndef _WIN2K_TARGET_
2389 FsRtlSetupAdvancedHeader(&
Vcb->Header, &
Vcb->Mutex);
2391 VcbResourceInitialized =
TRUE;
2402 NotifySyncInitialized =
TRUE;
2405 Vcb->SuperBlock =
sb;
2408 Vcb->DeviceObject = VolumeDevice;
2411 Vcb->RealDevice =
Vpb->RealDevice;
2412 Vpb->DeviceObject = VolumeDevice;
2416 if (
Vcb->InodeSize == 0) {
2425 InodeLookasideInitialized =
TRUE;
2459 Vpb->SerialNumber = ((
ULONG*)
sb->s_uuid)[0] +
2465 DiskSize =
Vcb->DiskGeometry.Cylinders.QuadPart *
2466 Vcb->DiskGeometry.TracksPerCylinder *
2467 Vcb->DiskGeometry.SectorsPerTrack *
2468 Vcb->DiskGeometry.BytesPerSector;
2476 &
Vcb->PartitionInformation,
2479 PartSize =
Vcb->PartitionInformation.PartitionLength.QuadPart;
2481 Vcb->PartitionInformation.StartingOffset.QuadPart = 0;
2482 Vcb->PartitionInformation.PartitionLength.QuadPart = DiskSize;
2483 PartSize = DiskSize;
2486 Vcb->Header.AllocationSize.QuadPart =
2487 Vcb->Header.FileSize.QuadPart = PartSize;
2489 Vcb->Header.ValidDataLength.QuadPart =
2490 Vcb->Header.FileSize.QuadPart;
2493 IoctlSize =
sizeof(
ULONG);
2505 Vcb->ChangeCount = ChangeCount;
2515 Vcb->Volume->SectionObjectPointer = &(
Vcb->SectionObject);
2516 Vcb->Volume->ReadAccess =
TRUE;
2517 Vcb->Volume->WriteAccess =
TRUE;
2518 Vcb->Volume->DeleteAccess =
TRUE;
2520 Vcb->Volume->FsContext2 =
NULL;
2521 Vcb->Volume->Vpb =
Vcb->Vpb;
2526 Vcb->Header.AllocationSize.QuadPart;
2545 ExtentsInitialized =
TRUE;
2548 Vcb->bd.bd_dev =
Vcb->RealDevice;
2549 Vcb->bd.bd_geo =
Vcb->DiskGeometry;
2550 Vcb->bd.bd_part =
Vcb->PartitionInformation;
2551 Vcb->bd.bd_volume =
Vcb->Volume;
2552 Vcb->bd.bd_priv = (
void *)
Vcb;
2560 if (!
Vcb->bd.bd_bh_cache) {
2566 Vcb->sb.s_magic =
sb->s_magic;
2567 Vcb->sb.s_bdev = &
Vcb->bd;
2570 Vcb->sb.s_priv = (
void *)
Vcb;
2571 Vcb->sb.s_fs_info = &
Vcb->sbi;
2574 Vcb->sbi.s_blocks_per_group =
sb->s_blocks_per_group;
2575 Vcb->sbi.s_first_ino =
sb->s_first_ino;
2576 Vcb->sbi.s_desc_size =
sb->s_desc_size;
2582 DEBUG(
DL_ERR, (
"EXT4-fs: unsupported descriptor size %lu\n",
Vcb->sbi.s_desc_size));
2590 Vcb->sbi.s_blocks_per_group =
sb->s_blocks_per_group;
2591 Vcb->sbi.s_inodes_per_group =
sb->s_inodes_per_group;
2597 if (
Vcb->sbi.s_inodes_per_block == 0) {
2601 Vcb->sbi.s_itb_per_group =
Vcb->sbi.s_inodes_per_group /
2602 Vcb->sbi.s_inodes_per_block;
2606 Vcb->sbi.s_desc_per_block_bits =
ilog2(
Vcb->sbi.s_desc_per_block);
2608 for (
i=0;
i < 4;
i++) {
2609 Vcb->sbi.s_hash_seed[
i] =
sb->s_hash_seed[
i];
2611 Vcb->sbi.s_def_hash_version =
sb->s_def_hash_version;
2618 "EXT3-fs warning: feature flags set on rev 0 fs, "
2619 "running e2fsck is recommended\n");
2634 "unsupported optional features (%x).\n",
2642 printk(
KERN_ERR "EXT3-fs: %s: unsupported optional features in this volume: (%x).\n",
2665 sb->s_blocks_per_group - 1) /
sb->s_blocks_per_group;
2667 Vcb->max_data_blocks = 0;
2675 Vcb->max_data_blocks +=
Vcb->max_blocks_per_layer[
i];
2679 Vcb->sbi.s_gdb_count = (
Vcb->sbi.s_groups_count +
Vcb->sbi.s_desc_per_block - 1) /
2680 Vcb->sbi.s_desc_per_block;
2689 if (
Vcb->IsExt3fs) {
2705 if (!
Vcb->McbTree) {
2712 if (!
Vcb->sb.s_root) {
2717 Vcb->sb.s_root->d_sb = &
Vcb->sb;
2718 Vcb->sb.s_root->d_inode = &
Vcb->McbTree->Inode;
2719 Vcb->McbTree->de =
Vcb->sb.s_root;
2723 Vcb->McbTree->Inode.i_sb = &
Vcb->sb;
2757 if (InodeLookasideInitialized) {
2761 if (ExtentsInitialized) {
2762 if (
Vcb->bd.bd_bh_cache) {
2771 if (
Vcb->Volume->PrivateCacheMap) {
2777 if (NotifySyncInitialized) {
2781 if (VcbResourceInitialized) {
2816 if (
Stream->PrivateCacheMap) {
2846 if (
Vcb->bd.bd_bh_cache)
2850 if (
Vcb->SuperBlock) {
2857 DEBUG(
DL_DBG, (
"Ext2DestroyVcb: Vpb2 to be freed: %p\n",
Vcb->Vpb2));
2874 DEBUG(
DL_DBG, (
"Ext2DestroyVcb: DevObject=%p Vcb=%p\n",
Vcb->DeviceObject,
Vcb));
2898 &UninitializeCompleteEvent );
2921 DEBUG(
DL_RES, (
"Ext2LinkTailMcb: %wZ already linked.\n",
2948 DEBUG(
DL_RES, (
"Ext2LinkHeadMcb: %wZ already linked.\n",
2970 DEBUG(
DL_RES, (
"Ext2UnlinkMcb: %wZ already unlinked.\n",
3002 while (
i++ <
Vcb->NumOfMcb) {
3014 Mcb->Refercount == 0 &&
3104 }
else if (DidNothing) {
3141 GlobalAcquired =
TRUE;
3153 DEBUG(
DL_RES, (
"Ext2ReaperThread: releasing Mcb (%p): %wZ"
3154 " Total: %xh\n",
Mcb, &
Mcb->FullName,
3164 if (GlobalAcquired) {
3166 GlobalAcquired =
FALSE;
3172 if (GlobalAcquired) {
3266 }
else if (DidNothing) {
3286 GlobalAcquired =
TRUE;
3299 if (GlobalAcquired) {
3301 GlobalAcquired =
FALSE;
3315 if (GlobalAcquired) {
3351 if (
Fcb->ReferenceCount > 0) {
3358 if (
now.QuadPart <
Fcb->TsDrop.QuadPart + 10*1000*1000*120) {
3371 if (
start.QuadPart + 10*1000*1000 >
now.QuadPart) {
3376 if (++tries < (
Vcb->FcbCount >> 4) )
3418 }
else if (DidNothing) {
3438 GlobalAcquired =
TRUE;
3451 if (GlobalAcquired) {
3453 GlobalAcquired =
FALSE;
3467 if (GlobalAcquired) {
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
static CC_FILE_SIZES FileSizes
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
struct outqueuenode * head
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 IRP_CONTEXT_FLAG_WAIT
#define RtlInitializeBitMap
#define NT_SUCCESS(StatCode)
#define APP_CMD_SET_PROPERTY3
#define EXT2_VOLUME_PROPERTY_MAGIC
#define EXT2_VPROP3_USERIDS
#define EXT2_MIN_BLOCK_SIZE
NTSTATUS Ext2InitializeLabel(IN PEXT2_VCB Vcb, IN PEXT2_SUPER_BLOCK Sb)
BOOLEAN Ext2QueryUnusedFcb(PEXT2_VCB Vcb, PLIST_ENTRY list)
VOID Ext2FreeMcb(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
BOOLEAN Ext2LookupMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG Length)
VOID Ext2JointExtents(IN PEXT2_EXTENT Chain, IN PEXT2_EXTENT Extent)
VOID Ext2SyncUninitializeCacheMap(IN PFILE_OBJECT FileObject)
VOID Ext2RemoveVcb(PEXT2_VCB Vcb)
VOID Ext2ReleaseFcb(IN PEXT2_FCB Fcb)
VOID Ext2ParseRegistryVolumeParams(IN PUNICODE_STRING Params, OUT PEXT2_VOLUME_PROPERTY3 Property)
BOOLEAN Ext2AddMcbMetaExts(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Block, IN ULONG Length)
VOID Ext2bhReaperThread(PVOID Context)
VOID Ext2McbReaperThread(PVOID Context)
PEXT2_IRP_CONTEXT Ext2AllocateIrpContext(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
VOID Ext2DestroyInode(IN PEXT2_VCB Vcb, IN PEXT2_INODE inode)
VOID Ext2FreeFcb(IN PEXT2_FCB Fcb)
BOOLEAN Ext2QueryUnusedBH(PEXT2_VCB Vcb, PLIST_ENTRY head)
struct dentry * Ext2AllocateEntry()
VOID Ext2DestroyExtentChain(IN PEXT2_EXTENT Chain)
NTSTATUS Ext2InitializeZone(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
PEXT2_EXTENT Ext2AllocateExtent()
VOID Ext2TearDownStream(IN PEXT2_VCB Vcb)
VOID Ext2FreeExtent(IN PEXT2_EXTENT Extent)
PEXT2_MCB Ext2SearchMcbWithoutLock(PEXT2_MCB Parent, PUNICODE_STRING FileName)
VOID Ext2UnlinkMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
BOOLEAN Ext2RemoveBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN ULONG Number)
NTSTATUS Ext2InitializeVcb(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_SUPER_BLOCK sb, IN PDEVICE_OBJECT TargetDevice, IN PDEVICE_OBJECT VolumeDevice, IN PVPB Vpb)
BOOLEAN Ext2RemoveMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Length)
VOID Ext2LinkHeadMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
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)
VOID Ext2LinkTailMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
NTSTATUS Ext2StartReaper(PEXT2_REAPER Reaper, EXT2_REAPER_RELEASE Free)
struct dentry * Ext2BuildEntry(PEXT2_VCB Vcb, PEXT2_MCB Dcb, PUNICODE_STRING FileName)
NTSTATUS Ext2QueryVolumeParams(IN PEXT2_VCB Vcb, IN PUNICODE_STRING Params)
BOOLEAN Ext2LookupVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG Length)
VOID Ext2FreeIrpContext(IN PEXT2_IRP_CONTEXT IrpContext)
BOOLEAN Ext2RemoveMcbMetaExts(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Block, IN ULONG Length)
VOID Ext2DestroyVcb(IN PEXT2_VCB Vcb)
VOID Ext2UnlinkFcb(IN PEXT2_FCB Fcb)
BOOLEAN Ext2CheckSetBlock(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, LONGLONG Block)
BOOLEAN Ext2RemoveVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, IN LONGLONG Length)
VOID Ext2StopReaper(PEXT2_REAPER Reaper)
PEXT2_MCB Ext2FirstUnusedMcb(PEXT2_VCB Vcb, BOOLEAN Wait, ULONG Number)
ULONG Ext2CountExtents(IN PEXT2_EXTENT Chain)
BOOLEAN Ext2BuildName(IN OUT PUNICODE_STRING Target, IN PUNICODE_STRING File, IN PUNICODE_STRING Parent)
BOOLEAN Ext2RemoveMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
BOOLEAN Ext2AddBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN ULONG Block, IN ULONG Number)
VOID Ext2InsertFcb(PEXT2_VCB Vcb, PEXT2_FCB Fcb)
PEXT2_CCB Ext2AllocateCcb(ULONG Flags, PEXT2_MCB SymLink)
VOID Ext2FcbReaperThread(PVOID Context)
PEXT2_MCB Ext2AllocateMcb(IN PEXT2_VCB Vcb, IN PUNICODE_STRING FileName, IN PUNICODE_STRING Parent, IN ULONG FileAttr)
PEXT2_MCB Ext2SearchMcb(PEXT2_VCB Vcb, PEXT2_MCB Parent, PUNICODE_STRING FileName)
PEXT2_INODE Ext2AllocateInode(PEXT2_VCB Vcb)
VOID Ext2FreeCcb(IN PEXT2_VCB Vcb, IN PEXT2_CCB Ccb)
VOID Ext2CheckExtent(PLARGE_MCB Zone, LONGLONG Vbn, LONGLONG Lbn, LONGLONG Length, BOOLEAN bAdded)
BOOLEAN Ext2CheckBitmapConsistency(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
VOID Ext2FreeEntry(IN struct dentry *de)
BOOLEAN Ext2ListExtents(PLARGE_MCB Extents)
VOID Ext2CleanupAllMcbs(PEXT2_VCB Vcb)
VOID Ext2InsertVcb(PEXT2_VCB Vcb)
BOOLEAN Ext2LookupBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN PULONG Block, IN PULONG Mapped)
VOID Ext2ClearAllExtents(PLARGE_MCB Zone)
BOOLEAN Ext2AddMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Lbn, IN LONGLONG Length)
PEXT2_FCB Ext2AllocateFcb(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
VOID Ext2InsertMcb(PEXT2_VCB Vcb, PEXT2_MCB Parent, PEXT2_MCB Child)
static __inline BOOLEAN Ext2IsNullUuid(__u8 *uuid)
NTSTATUS Ext2PerformRegistryVolumeParams(IN PEXT2_VCB Vcb)
BOOLEAN Ext2AddVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, IN LONGLONG Length)
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB * Dcb
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define PsGetCurrentThread()
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
NTSTATUS ExInitializeResourceLite(PULONG res)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define KeQuerySystemTime(t)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExDeleteResourceLite(res)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define ExAcquireResourceSharedLite(res, wait)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
#define EXT2_GOOD_OLD_INODE_SIZE
NTSTATUS Ext2BlockMap(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Index, IN BOOLEAN bAlloc, OUT PULONG pBlock, OUT PULONG Number)
#define DEC_IRP_COUNT(IrpContext)
#define EXT2_CHECKING_BITMAP
VOID Ext2FreePool(IN PVOID P, IN ULONG Tag)
#define ClearFlag(_F, _SF)
struct ext2_icb EXT2_IRP_CONTEXT
#define IsMcbSymLink(Mcb)
#define VCB_WRITE_PROTECTED
ext4_fsblk_t ext4_block_bitmap(struct super_block *sb, struct ext4_group_desc *bg)
struct _EXT2_CCB EXT2_CCB
BOOLEAN Ext2IsDotDot(PUNICODE_STRING name)
#define IsMcbSpecialFile(Mcb)
#define EXT2_REAPER_FLAG_STOP
ext4_fsblk_t ext4_inode_bitmap(struct super_block *sb, struct ext4_group_desc *bg)
#define VCB_REMOVABLE_MEDIA
static ext3_fsblk_t ext3_blocks_count(struct ext3_super_block *es)
#define IRP_CONTEXT_FLAG_VERIFY_READ
struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb, ext4_group_t block_group, struct buffer_head **bh)
PVOID Ext2AllocatePool(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
#define IRP_CONTEXT_FLAG_WRITE_THROUGH
#define IsFileDeleted(Mcb)
BOOLEAN Ext2IsMediaWriteProtected(IN PEXT2_IRP_CONTEXT IrpContext, IN PDEVICE_OBJECT TargetDevice)
LARGE_INTEGER Ext2NtTime(IN ULONG i_time)
#define EXT2_FIRST_DATA_BLOCK
BOOLEAN Ext2LoadGroup(IN PEXT2_VCB Vcb)
#define DEC_MEM_COUNT(_i, _p, _s)
ext4_fsblk_t ext4_inode_table(struct super_block *sb, struct ext4_group_desc *bg)
#define SetLongFlag(_F, _SF)
BOOLEAN Ext2IsDot(PUNICODE_STRING name)
BOOLEAN Ext2CheckDismount(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bForce)
ULONG Ext2Log2(ULONG Value)
NTSTATUS Ext2OEMToUnicode(IN PEXT2_VCB Vcb, IN OUT PUNICODE_STRING Oem, IN POEM_STRING Unicode)
#define VCB_JOURNAL_RECOVER
#define VCB_RO_COMPAT_READ_ONLY
struct _EXT2_MCB * PEXT2_MCB
NTSTATUS Ext2MapExtent(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Index, IN BOOLEAN Alloc, OUT PULONG Block, OUT PULONG Number)
loff_t ext3_max_size(int blkbits, int has_huge_files)
ULONG Ext2UnicodeToOEMSize(IN PEXT2_VCB Vcb, IN PUNICODE_STRING Unicode)
struct ext2_icb * PEXT2_IRP_CONTEXT
INT Ext2RecoverJournal(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
#define INC_IRP_COUNT(IrpContext)
#define ClearLongFlag(_F, _SF)
#define Ext2DerefMcb(Mcb)
#define FCB_DELETE_PENDING
NTSTATUS Ext2UnicodeToOEM(IN PEXT2_VCB Vcb, IN OUT POEM_STRING Oem, IN PUNICODE_STRING Unicode)
#define EXT2_SUPPORT_WRITING
struct _EXT2_EXTENT * PEXT2_EXTENT
BOOLEAN Ext2LoadInode(IN PEXT2_VCB Vcb, IN struct inode *Inode)
struct _EXT2_FCB EXT2_FCB
struct _EXT2_CCB * PEXT2_CCB
#define EXT2_MAX_USER_BLKSIZE
struct _EXT2_FCB * PEXT2_FCB
#define CEILING_ALIGNED(T, A, B)
#define EXT3_FORCEWRITING
#define EXT3_FORCE_WRITING
#define IsDispending(Vcb)
NTSTATUS Ext2MapIndirect(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Index, IN BOOLEAN bAlloc, OUT PULONG pBlock, OUT PULONG Number)
VOID Ext2DropBH(IN PEXT2_VCB Vcb)
loff_t ext3_max_bitmap_size(int bits, int has_huge_files)
#define Ext2ReferMcb(Mcb)
VOID Ext2PutGroup(IN 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)
#define IsZoneInited(Mcb)
#define INC_MEM_COUNT(_i, _p, _s)
VOID(* EXT2_REAPER_RELEASE)(PVOID)
struct _EXT2_MCB EXT2_MCB
#define VCB_BEING_DROPPED
NTSTATUS Ext2ProcessVolumeProperty(IN PEXT2_VCB Vcb, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
#define EXT4_MIN_DESC_SIZE
#define EXT4_MAX_DESC_SIZE
#define EXT3_INODES_PER_GROUP(s)
#define EXT4_FEATURE_INCOMPAT_64BIT
#define EXT4_FEATURE_INCOMPAT_DIRDATA
#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE
#define EXT4_FEATURE_COMPAT_HAS_JOURNAL
#define EXT3_HAS_COMPAT_FEATURE(sb, mask)
#define EXT3_GOOD_OLD_REV
#define EXT3_HAS_INCOMPAT_FEATURE(sb, mask)
#define EXT4_FEATURE_RO_COMPAT_SUPP
#define EXT3_HAS_RO_COMPAT_FEATURE(sb, mask)
#define EXT4_FEATURE_INCOMPAT_SUPP
#define EXT4_MIN_DESC_SIZE_64BIT
#define INODE_HAS_EXTENT(i)
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
IN PDCB IN POEM_STRING OemName
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
#define ExAllocatePool(type, size)
VOID NTAPI FsRtlInitializeFileLock(IN PFILE_LOCK FileLock, IN PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine OPTIONAL, IN PUNLOCK_ROUTINE UnlockRoutine OPTIONAL)
VOID NTAPI FsRtlUninitializeFileLock(IN PFILE_LOCK FileLock)
VOID NTAPI FsRtlTeardownPerStreamContexts(IN PFSRTL_ADVANCED_FCB_HEADER AdvFcbHeader)
_Must_inspect_result_ _In_ PCUNICODE_STRING Name2
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
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)
GLuint GLuint GLsizei count
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
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 GLint GLint j
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
#define EXCEPTION_EXECUTE_HANDLER
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
VOID NTAPI FsRtlRemoveLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG SectorCount)
VOID NTAPI FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb, IN LONGLONG Vbn)
BOOLEAN NTAPI FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Lbn, IN LONGLONG SectorCount)
VOID NTAPI FsRtlUninitializeLargeMcb(IN PLARGE_MCB Mcb)
VOID NTAPI FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb, IN POOL_TYPE PoolType)
BOOLEAN NTAPI FsRtlLookupLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, OUT PLONGLONG Lbn OPTIONAL, OUT PLONGLONG SectorCountFromLbn OPTIONAL, OUT PLONGLONG StartingLbn OPTIONAL, OUT PLONGLONG SectorCountFromStartingLbn OPTIONAL, OUT PULONG Index OPTIONAL)
ULONG NTAPI FsRtlNumberOfRunsInLargeMcb(IN PLARGE_MCB Mcb)
BOOLEAN NTAPI FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb, IN ULONG RunIndex, OUT PLONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG SectorCount)
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
VOID NTAPI ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
PCONFIGURATION_COMPONENT_DATA RootNode
#define memcpy(s1, s2, n)
void free_buffer_head(struct buffer_head *bh)
kmem_cache_t * kmem_cache_create(const char *name, size_t size, size_t offset, unsigned long flags, kmem_cache_cb_t ctor)