> **Engineering status**
>
> `ext4.sys` provides native ext2/ext3/ext4 read/write access on bare-metal Windows systems and in virtual machines. Validation covers the full Windows/Linux matrix, dedicated ext2/ext3 checks, earlier 16 TiB boundary campaigns and production-code regression models. It also includes Driver Verifier and repeated unload testing. Metadata checksums are verified on read; corruption found on disk is recorded in the superblock and handled as the volume's `errors=` setting asks. Microsoft production signing is pending; loading uses KVC or DrvLoader on systems you administer. Keep a backup of important data.
Repository policy: the release archive is not password-protected. Git tracks the active source, project files, tests and documentation. Build outputs, symbols, local tooling, virtual disks and test logs stay outside the repository. Test passphrase defaults in two PowerShell scripts are represented by <TEST_LUKS_PASSPHRASE>.
Ext4 for Windows — Native ext2/ext3/ext4 Read/Write Driver
A drive letter for your Linux partition • journaled writes • controlled unload
jbd2 journal, extents with unwritten preallocation, htree directories, metadata checksums, wide physical block addressing
Windows writes checked from Linux: metadata consistency and byte-exact contents
ext4.sys is a native Windows kernel-mode file system driver for ext2, ext3 and ext4 volumes. It registers with the I/O manager, cache manager and mount manager. An ext4 partition receives a drive letter, appears in Explorer and Disk Management, and supports normal Windows file operations: create, write, rename, map and delete. Metadata updates pass through a jbd2 journal that Linux can replay. Writes use unwritten extents with Linux-compatible on-disk semantics. The validation pipeline checks Windows-written files from Linux using e2fsck and SHA-256.
The codebase retains parts of Ext2Fsd by Matt Wu, Ext4Fsd by Bo Branten and Linux ext4/jbd2. Their code, algorithms and licensing scope are identified in Code Lineage and Redesign, where a map of every file shows the measured result: 75 % of the project's code lines are written or generated in this project. The active Windows paths were then reorganized, rewritten and tested from Windows through to Linux media verification.
Table of Contents
Overview
Windows has no native ext4 file-system driver. On dual-boot and larger multiboot systems, ext4 volumes used by Ubuntu, Qubes OS and other Linux installations appear without a drive letter or \\?\Volume{...} link. The same happens when an ext4 disk is attached over USB. Disk Management reports these volumes as unknown.
The ways of reaching an ext4 partition from Windows, and what each one costs:
| Way in |
What it costs |
Drive letter, every program works? |
wsl --mount |
a Linux VM, administrator rights, the whole disk handed to WSL |
No — files are reached through \\wsl.localhost |
| Copy tools (read-only viewers) |
one application |
No — copy out only, no writes |
| Commercial drivers |
a paid licence, closed source |
Yes |
| Ext2Fsd / Ext4Fsd |
one driver, open source |
Yes — the base this driver grew from |
ext4.sys |
one kernel driver, open source |
Yes, journaled, e2fsck-clean, stops on demand |
Design rules the code follows:
- Independent media verification. The full matrix detaches the test volume from Windows, checks it with
e2fsck and uses the Linux kernel to verify the files listed in the test manifests with SHA-256.
- Event-driven background work. Reapers use deadlines and notifications; volume teardown is woken when references are released. Protocol timing, such as multi-mount protection, follows the on-disk protocol.
- Never write what Linux would not. A journal that cannot be opened mounts the volume read-only instead of writing unjournaled; a feature the driver does not implement refuses the mount or forces read-only.
- Warning-free is the minimum.
/W4 /WX /std:clatest in both configurations: a warning is a build error.
Code Lineage and Redesign
Every code file of the driver, ext4ctl.exe, the tests and the generators, sized by its code lines and coloured by where they come from. Comments and blank lines are left out. tools/lineage/lineage-svg.py draws the three pictures from the measurement described below.
The driver by subsystem
I developed the current Windows architecture around explicit object lifetimes, per-volume transaction ownership and bounded error handling. The active write, allocation, journal, mount, unload and security paths have been replaced or substantially rewritten, with modules organised by responsibility. I verify their behaviour with production-code models and Windows-to-Linux media checks. Mathematical precision guides this work: explicit invariants, bounded state transitions, clear ownership and measured hot paths.
The table below records retained components and their technical lineage. Attribution and licence notices remain with the source. I am continuing the rewrite toward self-contained, independently authored modules, with MIT licensing as a long-term goal for an independent implementation. Eight such modules are MIT-licensed so far. The case folding of casefolded directories, src/unicode - tables generated from the Unicode Character Database, the normalizer and their interface - is written from its specification and produces exactly the bytes Linux produces. The code page converters, src/nls/CharsetMap.c, the 37 nls_<code page>.c files and EUC-JP, are generated from the published Microsoft, ISO 8859, KOI8 and JIS X 0212 mapping tables in a representation of my own; the inherited converters serve only as the reference they are proven equal to. The red-black tree under the buffer heads, the run map and the htree reader, src/linux/rbtree.c, is written anew from its rules, each repair once for both mirror images, and checked against a sorted array. The journal's recovery side - the log format (src/journal/JournalFormat.h), the replay (JournalReplay.c) and the loading of a journal at mount (JournalLoad.c) - is written from the rules jbd2 follows, not from its code; the engine that writes the log uses the same format definitions. The orphan cleanup at mount, src/ext4/Orphans.c, is new. So are the directories - the name hashes, a directory's blocks and their hash index, the multiset of its caseless names (NameHash.c, DirBlock.c, DirIndex.c, NameSet.c) and their use in the driver - the extent tree (ExtentCore.c, ExtentFile.c) and the placement of new blocks (BlockPlacement.c, BlockWindows.c): each written from the rules of the format, or of the problem, and proven against a model before the driver used it (see Testing). The current combined driver remains GPL-2.0-only.
How much of the code is new is measured, not estimated. Of the 275 844 C tokens written by hand - comments and the generated tables (code pages, case folding, NTSTATUS names) left out - 61.1 % lie in no run of twelve tokens that also occurs in an origin. 35.2 % still match Ext2Fsd as Matt Wu left it in Ext3Fsd; 3.5 % match Ext4Fsd; 0.2 % matches Linux v6.6 directly. Counted by code line, a line going to the origin of most of its tokens, the driver's hand-written code is 56.4 % new; with ext4ctl.exe, the tests and the generators, the project's 80 965 code lines are 56.7 % written by hand and 19.2 % generated by its own tools (the pictures above). Counted by token, the rewritten subsystems are 92-98 % new: the journal (98 %), case folding (97 %), the extent tree (96 %), block allocation with its placement, windows, search, deferred reuse and metadata map (96 %), the code page converters CharsetMap and EUC-JP (93 %) and the directory index (92 %); the unload and the name cache are 83 % new. The retained share sits mostly in the I/O request handlers (src/fsd, 31 % of it), the on-disk code of src/ext4 (21 %, about half of that in metadata checksums, indirect blocks, group descriptors and inode storage) and the headers (20 %). Exact runs count renamed code as new. A stricter count replaces every identifier, number and string by its kind and compares runs of twenty tokens, so that code which was only renamed counts as inherited too: by it the new share is 43.3 %. tools/lineage/lineage.py repeats the measurement.
| Source project |
Attribution |
Retained components and lineage |
| Ext2Fsd |
Matt Wu, with KaHo Ng |
The FCB/MCB model, fast I/O, the extent and htree routines Matt Wu ported from Linux, and much of the support code; ext2/ext3 lineage |
| Ext4Fsd |
Bo Branten |
ext4 structures, checksum and jbd2 lineage, Visual Studio project ancestry |
Linux kernel — fs/ext4, fs/jbd2, fs/nls |
Linus Torvalds, Stephen Tweedie, Red Hat, Cluster File Systems and the ext4 / jbd2 developers |
Extent-tree, htree, checksum and journal algorithms; the code page registry, UTF-8 and the KOI8-RU adapter |
| lwext4 |
Grzegorz Kostka, KaHo Ng |
The original extended-attribute implementation; its BSD notice remains in ext4_xattr.h |
| Unicode Character Database 12.1.0 |
Unicode, Inc. |
Data of the case folding tables (src/unicode/utf8data.c), under the Unicode terms of use |
| unicode.org MAPPINGS — Microsoft code pages, ISO/IEC 8859, KOI8 |
Microsoft Corporation, Unicode, Inc. |
Data of the code page tables (src/nls/nls_*.c), under the Unicode terms of use |
What changed on the way to ext4.sys, in short:
- Structure. The monolithic source tree is divided by responsibility into
driver, fsd, volume, core, ext4, journal, linux, nls and support. Each area has its own header; the former umbrella header had 3 400 lines. Before behavior changed, preprocessing proved the split token-identical across 1 615 functions.
- Journal commits and recovery. A Windows-native jbd2 commit engine logs every metadata change and commits it before the home write. Linux
e2fsck or the driver replays an interrupted transaction at the next mount; the driver's replay follows jbd2's rules - revokes, the three checksum versions, stale blocks of an earlier round of the log, async commits - and leaves every block as e2fsck leaves it (tests/journal-replay-wsl.sh). New transaction IDs start past every ID the replay found in the log.