Expand description
Streaming $MFT scanner (ADR-0011).
The $MFT’s data runs are read in 16MiB aligned chunks through our own volume handle, records are fixed up and parsed per chunk, and the buffers are recycled — peak RAM is bounded at a few chunks. ntfs-reader provides the bootstrap (boot-sector geometry + record 0’s data runs) and the per-record attribute parsing types.
Two layers of overlap (entry order stays byte-for-byte identical to a sequential scan):
- a dedicated I/O thread reads chunk N+1 while chunk N parses
(
pipeline::run_chunk_pipeline; degrades to inline reads if the thread can’t start —scan_pipeline_fallbacks) - within a chunk, record sub-ranges parse on rayon workers that carry
the WTF-8 encoding too (
parse::parse_chunk); the builder then appends the worker batches in chunk order, soEntryIdassignment is deterministic.
Modules§
- deferred 🔒
- Deferred $
ATTRIBUTE_LISTname resolution (ADR-0011): name-bearing extension records are cached in RAM while the $MFT streams through, so this pass resolves names without disk reads; anything missing (cache cap, torn records) falls back to a targeted read of the live volume. - parse 🔒
- Parallel chunk parsing (ADR-0011): record sub-ranges of one chunk fan
out across rayon workers, each producing a
ParsedBatch; the builder appends the batches in chunk order, soEntryIdassignment is deterministic. - pipeline 🔒
- Read-ahead pipeline (ADR-0011): record-aligned chunk planning over the
$MFT run map, plus the dedicated I/O thread that reads chunk N+1 while
chunk N parses. If the thread can’t start, the scan degrades to inline
sequential reads (
scan_pipeline_fallbacks). - probe 🔒
- I/O strategy probe (
fmf io-probe). - volume_
io 🔒 - Raw volume access:
\\.\C:-style handles, the NTFS update-sequence fixup, and the logical→physical run map of the $MFT data stream. - walk
- Non-elevated folder-walk scanner for scope mode (ADR-0024).
- walk_id 🔒
- Synthetic record numbers for scope-mode (folder-walk) indexing (ADR-0024).
Structs§
- Probe
Stats - Throughput result of one measured $MFT read pass.
- Scan
Stats - Statistics from a full index build.
Enums§
- IoProbe
Mode - I/O strategy to measure for one $MFT read pass (ADR-0011).
Functions§
- io_
probe - Measure one $MFT read pass under
mode. Elevation required (the same volume-handle rule as the scan). - scan_
volume - Full initial scan: stream the volume’s $MFT and build the in-memory
index.
driveis a drive letter spec likeC:.