Repository navigation
fix(dm): bind fork_delta to a dm pool's metadata - #175
Merged
Merged
Conversation
DevPath is now a validated newtype. It refuses any path holding Unicode whitespace or byte 0xA0 (the kernel's isspace splits table operands on it), and any path under /dev/mapper/, which renders identically to an Origin::Device and flipped its paths()/devices() role on re-parse.
Summing mapping lengths panicked in debug and wrapped in release, where a wrapped total could match mapped_blocks and pass the truncation check.
thin_fork_delta ran thin_dump on whatever loop device the caller named, so a foreign pool's metadata silently forked the wrong blocks (and the fork flock was taken on that foreign device). ThinPool now exposes its live table's <metadata dev>, and the fork refuses a meta whose device number differs, before any snapshot is taken. read_full also retries io::ErrorKind::Interrupted instead of aborting the fork, as std's Read contract requires.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Test Results 4 files ± 0 263 suites +22 2m 51s ⏱️ -19s Results for commit da42cd6. ± Comparison against base commit e2764c3. This pull request removes 2 and adds 92 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Pull the thin-pool table parse out of ThinPool::open so the unprivileged suite pins which tables name a metadata device. Add a confinement law to the copy_ranges suite: every read is non-empty and inside one listed range, which catches read_full asking for more once its buffer is full. The root-only metadata-device check is excluded, naming its _as_root killer.
markovejnovic
marked this pull request as ready for review
November 16, 2026 02:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.