Repository navigation
Follow $MFT $ATTRIBUTE_LIST so fragmented MFT scans read the full table - #73
Conversation
Record 0 only holds the first $DATA run list once $MFT spills into extension records. Read those records from the runs already in hand, append the rest in starting-VCN order, and warn on stderr when the joined map is still short of MftValidDataLength.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
A non-resident $ATTRIBUTE_LIST is read in whole sectors, and only the initialized prefix is parsed. A failed list or extension read warns and continues with the runs already in hand.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23077cf636
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A 1 MiB cap dropped every extension record past the prefix and the scan still returned that partial map. Size the read from the list's initialized length and its own runs. Above 32 MiB, keep record 0 and warn instead of parsing a prefix.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6643d01505
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… load A non-resident list whose runs stop short of its initialized length was parsed as a prefix, so later $DATA extension records disappeared. Keep record 0 and warn instead. Rebuild the run map before each extension read so an in-order chain is loaded in one pass.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4049bdc3a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Fixes #69.
When
$MFTis fragmented enough that record 0 cannot hold the whole$DATArun list, NTFS stores the rest in extension records and points at them with$ATTRIBUTE_LIST. The scanner kept only the first unnamed run list in record 0. On the reported C: drive that was 69 extents and about 14.6 GB of a 28.3 GB table, so roughly half the records were never read and path building failed for parents that live in the unread half.Record 0's attribute list is now followed. Each unnamed
$DATAextent is loaded from its extension record (a non-resident list is read from its own runs), and the pieces are joined in starting-VCN order. A missing piece stays a sparse hole so later record numbers stay aligned. If an extension cannot be read, the scan continues with the runs it has. stderr warns when that map is still short ofMftValidDataLength, or when extension records were left unread:Name lookup for other files is unchanged: an extension record is still read only to recover
$DATAsize. Overview is unchanged.The parser is covered by unit tests that run on every platform.
mft.rsis Windows-only; it was typechecked here withcargo check --tests --target x86_64-pc-windows-msvc.