472{
477
480
482
483 int rc = 0;
486
487
490
492 "Ext2Fsd --"
494 " Win2k --"
495#endif
496 " Version "
499 " Checked"
500#else
501 " Free"
502#endif
503 " -- "
504 __DATE__ " "
505 __TIME__ ".\n");
506
508
509
512 goto errorout;
513 }
514 linux_lib_inited =
TRUE;
515
516
518 if (rc != 0) {
520 goto errorout;
521 }
522 journal_module_inited =
TRUE;
523
524
528 goto errorout;
529 }
530
531
535
538
539
541
542
546 0,
549 0,
551 &CdromdevObject );
552
554 DEBUG(
DL_ERR, (
"IoCreateDevice cdrom device object error.\n"));
555 goto errorout;
556 }
557
558
562 0,
565 0,
567 &DiskdevObject );
568
570 DEBUG(
DL_ERR, (
"IoCreateDevice disk device object error.\n"));
571 goto errorout;
572 }
573
578 goto errorout;
579 }
580
581
587 goto errorout;
588 }
589
596 goto errorout;
597 }
598
599#ifdef _PNP_POWER_
600 DiskdevObject->DeviceObjectExtension->PowerControlNeeded =
FALSE;
601 CdromdevObject->DeviceObjectExtension->PowerControlNeeded =
FALSE;
602#endif
603
604
607
612
615
618
621
626
629
631
632#if (_WIN32_WINNT >= 0x0500)
634#endif
635
636#if EXT2_UNLOAD
638#else
640#endif
641
642
643
644
645
647
659
668
670
671
672
673
674
678
698
700
702
704 break;
705
707
709 break;
710
712
714 break;
715 }
716
717
718
719
720
726
731
732
733#ifndef _WIN2K_TARGET_
734
735
736
737
742
743#endif
744
745
746
747
748
752 0,
754 'PRIE',
755 0 );
756
760 0,
762 'BCFE',
763 0 );
764
768 0,
770 'BCCE',
771 0 );
772
776 0,
778 'BCME',
779 0 );
780
784 0,
786 'STXE',
787 0 );
788
792 0,
794 'TNED',
795 0 );
796
799
800#if EXT2_DEBUG
802#endif
803
805
808
809
812
815
816errorout:
817
819
820
821
822
823
824
825
826
827
828
832 }
833
834 if (CdromdevObject) {
836 }
837
838 if (DiskdevObject) {
840 }
841
842 if (journal_module_inited) {
843
845 }
846
847 if (linux_lib_inited) {
848
850 }
851 }
852
854}
#define NT_SUCCESS(StatCode)
#define EXT2_PERF_STAT_VER2
struct _EXT2_PERF_STATISTICS_V2 EXT2_PERF_STATISTICS_V2
#define EXT2_PERF_STAT_MAGIC
BOOLEAN Ext2QueryRegistrySettings(IN PUNICODE_STRING RegistryPath)
NTSTATUS ExInitializeResourceLite(PULONG res)
#define ExDeleteResourceLite(res)
#define InitializeListHead(ListHead)
VOID Ext2FreePool(IN PVOID P, IN ULONG Tag)
struct ext2_icb EXT2_IRP_CONTEXT
BOOLEAN Ext2FastIoRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
BOOLEAN Ext2FastIoLock(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER Length, IN PEPROCESS Process, IN ULONG Key, IN BOOLEAN FailImmediately, IN BOOLEAN ExclusiveLock, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
VOID Ext2bhReaperThread(PVOID Context)
VOID Ext2McbReaperThread(PVOID Context)
struct _EXT2_CCB EXT2_CCB
BOOLEAN Ext2FastIoQueryBasicInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_BASIC_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
struct _EXT2_EXTENT EXT2_EXTENT
BOOLEAN Ext2FastIoUnlockAllByKey(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
NTSTATUS Ext2StartReaper(PEXT2_REAPER, EXT2_REAPER_RELEASE)
struct _EXT2_GLOBAL EXT2_GLOBAL
PVOID Ext2AllocatePool(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
BOOLEAN Ext2FastIoWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
BOOLEAN Ext2AcquireForLazyWrite(IN PVOID Context, IN BOOLEAN Wait)
ULONG Ext2GetProcessNameOffset(VOID)
struct _EXT2_VCB EXT2_VCB
NTSTATUS Ext2ReleaseFileForModWrite(IN PFILE_OBJECT FileObject, IN PERESOURCE ResourceToRelease, IN PDEVICE_OBJECT DeviceObject)
VOID Ext2AcquireForCreateSection(IN PFILE_OBJECT FileObject)
VOID Ext2ReleaseFromLazyWrite(IN PVOID Context)
BOOLEAN Ext2FastIoQueryStandardInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_STANDARD_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
BOOLEAN Ext2NoOpAcquire(IN PVOID Fcb, IN BOOLEAN Wait)
NTSTATUS Ext2ReleaseFileForCcFlush(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
NTSTATUS Ext2PreAcquireForCreateSection(IN PFS_FILTER_CALLBACK_DATA cd, OUT PVOID *cc)
BOOLEAN Ext2AcquireForReadAhead(IN PVOID Context, IN BOOLEAN Wait)
NTSTATUS Ext2AcquireFileForCcFlush(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
VOID Ext2ReleaseFromReadAhead(IN PVOID Context)
void ext2_destroy_linux()
BOOLEAN Ext2FastIoUnlockAll(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
BOOLEAN Ext2FastIoCheckIfPossible(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, IN BOOLEAN CheckForReadOperation, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
VOID Ext2StopReaper(PEXT2_REAPER Reaper)
VOID Ext2FcbReaperThread(PVOID Context)
struct _EXT2_FCB EXT2_FCB
BOOLEAN Ext2FastIoQueryNetworkOpenInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_NETWORK_OPEN_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
VOID Ext2ReleaseForCreateSection(IN PFILE_OBJECT FileObject)
struct ext3_dir_entry_2 EXT2_DIR_ENTRY2
VOID Ext2NoOpRelease(IN PVOID Fcb)
NTSTATUS Ext2BuildRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
struct _EXT2_MCB EXT2_MCB
BOOLEAN Ext2FastIoUnlockSingle(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER Length, IN PEPROCESS Process, IN ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
struct _EXT2_RW_CONTEXT EXT2_RW_CONTEXT
NTSTATUS Ext2AcquireFileForModWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER EndingOffset, OUT PERESOURCE *ResourceToRelease, IN PDEVICE_OBJECT DeviceObject)
static DRIVER_UNLOAD DriverUnload
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)
static char DosDeviceName[DEVICE_SIZE]
MM_SYSTEMSIZE NTAPI MmQuerySystemSize(VOID)
struct nls_table * load_nls(char *)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI FsRtlRegisterFileSystemFilterCallbacks(PDRIVER_OBJECT FilterDriverObject, PFS_FILTER_CALLBACKS Callbacks)
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)
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
VOID NTAPI IoRegisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
FAST_IO_DISPATCH FastIoDispatch
#define FILE_DEVICE_DISK_FILE_SYSTEM
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM
#define IRP_MJ_DIRECTORY_CONTROL
#define IRP_MJ_DEVICE_CONTROL
#define IRP_MJ_QUERY_VOLUME_INFORMATION
#define IRP_MJ_LOCK_CONTROL
#define IRP_MJ_SET_INFORMATION
#define IRP_MJ_QUERY_INFORMATION
static void __exit journal_exit(void)
static int __init journal_init(void)
PACQUIRE_FOR_LAZY_WRITE AcquireForLazyWrite
PRELEASE_FROM_LAZY_WRITE ReleaseFromLazyWrite
PACQUIRE_FOR_READ_AHEAD AcquireForReadAhead
PRELEASE_FROM_READ_AHEAD ReleaseFromReadAhead
FAST_IO_DISPATCH FastIoDispatch
CACHE_MANAGER_CALLBACKS CacheManagerNoOpCallbacks
NPAGED_LOOKASIDE_LIST Ext2ExtLookasideList
NPAGED_LOOKASIDE_LIST Ext2McbLookasideList
NPAGED_LOOKASIDE_LIST Ext2IrpContextLookasideList
NPAGED_LOOKASIDE_LIST Ext2FcbLookasideList
EXT2_IDENTIFIER Identifier
struct _EXT2_GLOBAL::@697 Codepage
FS_FILTER_CALLBACKS FilterCallbacks
PDEVICE_OBJECT DiskdevObject
NPAGED_LOOKASIDE_LIST Ext2DentryLookasideList
EXT2_PERF_STATISTICS_V2 PerfStat
NPAGED_LOOKASIDE_LIST Ext2CcbLookasideList
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
PDEVICE_OBJECT CdromdevObject
EXT2_IDENTIFIER_TYPE Type
PFAST_IO_ACQUIRE_FOR_MOD_WRITE AcquireForModWrite
PFAST_IO_QUERY_STANDARD_INFO FastIoQueryStandardInfo
PFAST_IO_UNLOCK_ALL_BY_KEY FastIoUnlockAllByKey
PFAST_IO_RELEASE_FOR_CCFLUSH ReleaseForCcFlush
PFAST_IO_WRITE FastIoWrite
PFAST_IO_UNLOCK_ALL FastIoUnlockAll
PFAST_IO_QUERY_NETWORK_OPEN_INFO FastIoQueryNetworkOpenInfo
PFAST_IO_ACQUIRE_FOR_CCFLUSH AcquireForCcFlush
ULONG SizeOfFastIoDispatch
PFAST_IO_ACQUIRE_FILE AcquireFileForNtCreateSection
PFAST_IO_QUERY_BASIC_INFO FastIoQueryBasicInfo
PFAST_IO_UNLOCK_SINGLE FastIoUnlockSingle
PFAST_IO_RELEASE_FILE ReleaseFileForNtCreateSection
PFAST_IO_RELEASE_FOR_MOD_WRITE ReleaseForModWrite
PFAST_IO_CHECK_IF_POSSIBLE FastIoCheckIfPossible
ULONG SizeOfFsFilterCallbacks
PFS_FILTER_CALLBACK PreAcquireForSectionSynchronization
#define FIELD_OFFSET(t, f)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INSUFFICIENT_RESOURCES
ULONG Slot[PS_MAX_TYPE_V2]
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MJ_SET_VOLUME_INFORMATION
struct _FS_FILTER_CALLBACKS FS_FILTER_CALLBACKS
struct _FAST_IO_DISPATCH FAST_IO_DISPATCH
#define IRP_MJ_FLUSH_BUFFERS
#define ObReferenceObject