You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: harden Ext2Mgr mount assigns and Ext2Srv pipe accept
Prevent Ext2Mgr Session Manager assigns from crashing on non-EXT volumes
(MountPoints.cpp). Speed Ext2Srv named-pipe accept with dual idle
listeners, softer create retries, and no WRITE_THROUGH. Document those
changes in Ext2Mgr/IMPROVEMENTS.md and the root README. Drop the January
.gitignore entries for docs/ and Ext4Fsd.sln.
Fixes and service changes that apply to the **regular** MFC **Ext2 Volume Manager** (`Ext2Mgr/`) and/or **Ext2Srv**, independent of the Iced port.
4
+
5
+
Rebuild Ext2Mgr / reinstall Ext2Srv (`Scripts\build.ps1`, `Scripts\install_driver.ps1`) to pick these up. Optional Iced GUI comparisons live on the `ext2mgr-iced` branch under `ext2mgr_iced/PORT_IMPROVEMENTS.md`.
**Symptom:** Choosing **Session Manager DOS Devices** (or temporary DOS devices) for an NTFS/FAT partition could crash Ext2Mgr.
14
+
15
+
**Cause:**`CMountPoints::AddMountPoint` in `MountPoints.cpp`:
16
+
17
+
1. On successful Session Manager registry write it called `EndDialog(0)`**without returning**, so execution continued.
18
+
2. It always ran `Ext2QueryExt2Property(Handle, EVP)` to store Ext2Fsd automount properties.
19
+
3. For a **partition-selected** native volume, `EVP` stayed **NULL** (only set from `m_Volume` or an EXT `m_Part->Volume` branch) → null dereference.
20
+
21
+
**Fix:**
22
+
23
+
-`return TRUE` immediately after a successful Session Manager assign + `EndDialog`.
24
+
- If `EVP` is NULL, **skip** the Ext2 property IOCTL path and only assign the DOS letter (`Ext2AssignDrvLetter`), then update letter masks / notify.
25
+
26
+
**Note:** Classic assign remains `DefineDosDevice` to `\Device\HarddiskVolumeN` (same path Session Manager uses). This fix is **crash safety** only.
27
+
28
+
---
29
+
30
+
## Ext2Srv (`Ext2Srv/`)
31
+
32
+
These pipe-server changes help **both** Ext2Mgr and `ext2mgr_iced` (temporary EXT letter ops via `\\.\pipe\EXT2MGR_PSRV`).
33
+
34
+
| Change | File | What |
35
+
|--------|------|------|
36
+
| Dual idle pipe listeners |`Ext2Pipe.cpp` (`Ext2StartPipeSrv`) | Second `Ext2PipeEngine` thread so reconnect / overlap rarely hits `ERROR_PIPE_BUSY`|
37
+
| Soft create retries |`Ext2Pipe.cpp` (`Ext2PipeEngine`) | Cap create failures at 3×50ms (+ short sleep) instead of long backoff storms |
38
+
| No `FILE_FLAG_WRITE_THROUGH`|`Ext2Pipe.cpp` (`Ext2CreatePipe`) | Dropped on tiny IPC messages; measured after reinstall (2026-07-28): cold connect median ~0.7 ms, burst reconnect ~0.2 ms, `QUERY_DRV`~0.1 ms (query-only probe) |
39
+
40
+
---
41
+
42
+
## Intentionally not changed here
43
+
44
+
| Topic | Status |
45
+
|-------|--------|
46
+
| Mount Manager for NTFS in classic Ext2Mgr | Not needed for Explorer when Session Manager / DosDevice targets `\Device\HarddiskVolumeN`. Classic UI still forces DosDev (`#if TRUE` in `MountPoints.cpp`). |
47
+
| EXT-only “Assign Drive Letter” gating | Iced-only (classic still offers assign more broadly and can wait on Ext2Srv). |
Copy file name to clipboardExpand all lines: README.md
+49-2Lines changed: 49 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,26 @@
1
+
Scripts and building from source (this fork)
2
+
--------------------------------------------
3
+
4
+
This fork adds PowerShell scripts for building, installing, signing, and diagnosing the driver. All scripts live in **Scripts/**. Run them from the repo root, e.g. `.\Scripts\build.ps1`.
5
+
6
+
**Build and install**
7
+
-**Scripts\build.ps1** — Build driver, Ext2Srv, Ext2Mgr (requires Visual Studio 2019/2022 and WDK for the driver). Optionally signs the driver if `EXT4FSD_CERT_PATH` is set. Ext2Mgr vendors a small `Ext2Mgr/mountmgr.h`, so the manager app can be built without installing the full WDK.
8
+
-**Scripts\install_driver.ps1** — Copy driver to System32, register kernel driver, install Ext2Srv. Run as Administrator.
9
+
-**Scripts\uninstall_driver.ps1** — Remove driver and services.
10
+
-**Scripts\register_driver.ps1** — Register the kernel driver service (driver must already be in System32).
11
+
-**Scripts\disable_driver.ps1** — Disable the Ext2Fsd service (e.g. to stop boot retries after signature failures).
12
+
13
+
**Signing**
14
+
-**Scripts\sign_driver.ps1** — Sign the driver with a code-signing certificate. Set `EXT4FSD_CERT_PATH` and optionally `MSIX_CERT_PASSWORD`, or pass `-CertificatePath` / `-CertificatePassword`.
15
+
-**Scripts\install_certificate.ps1** — Install the signing certificate into Trusted Publishers (required for loading self-signed drivers). Run as Administrator.
16
+
17
+
**Diagnostics**
18
+
-**Scripts\diagnose_ext2fsd.ps1** — Unified diagnostic (signature, cert stores, event log, driver status). Use for load failures or error 577. Use `-UseSigntool:$false` to skip signtool (e.g. when SDK is not installed).
19
+
-**Scripts\check_driver_load_error.ps1**, **Scripts\diagnose_error_577.ps1**, **Scripts\verify_driver_signature.ps1** — Wrappers that call `diagnose_ext2fsd.ps1`.
20
+
21
+
**Other**
22
+
-**Scripts\fix_sdk_version.ps1** — Update project files' `WindowsTargetPlatformVersion` to match the installed SDK.
23
+
1
24
2
25
Latest release
3
26
--------------
@@ -50,6 +73,16 @@ Changes to the source code in git after latest release
50
73
- The fields s_wtime and s_wtime_hi in the superblock will be
51
74
updated with the current time at shutdown.
52
75
76
+
- Timeouts on block/PnP/fsctl waits so surprise-removal of USB
77
+
or other removable ext4 volumes no longer hangs the system
78
+
waiting forever for I/O that will never complete.
79
+
80
+
- Corrected the wait argument to CcCopyRead / CcCopyWrite and
81
+
simplified the related read/write paths.
82
+
83
+
- Filesystems with EXT4_FEATURE_INCOMPAT_CASEFOLD can be mounted
84
+
(the feature bit is treated as supported).
85
+
53
86
Application:
54
87
55
88
- If an on disk filesystem contains new ext4 features that is
@@ -66,6 +99,16 @@ Changes to the source code in git after latest release
66
99
- The donate dialog box is disabled because the information in
67
100
it is outdated.
68
101
102
+
- High-DPI awareness is disabled in the Ext2Mgr project so the
103
+
classic Win32 UI scales more predictably on high-resolution
104
+
monitors.
105
+
106
+
- Ext2Mgr includes a subset of mountmgr.h so the application can
107
+
be compiled without installing the Windows Driver Kit.
0 commit comments