Repository navigation
openvmm: pin the comments that scope inode deduplication to a volume - #2062
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoNov 24, 2026
Merged
Conversation
The comment of OpenVMM's VirtioFs::insert_inode said that, on a file system with stable inode numbers, an inode that already existed with the inserted inode's device and inode number was returned instead (#1905). That reads as a key over the whole file system, while the virtio-fs server matches a host object only among the inodes of one volume, by its device and inode numbers on a volume with stable file IDs and by its path on any other, and reuses only an inode of the same file type. Section 3.6.4 of the host filesystem design already says so, since #1875. Pin microsoft/openvmm 7e94a090a80de4f5ac08a1ab74d1726da4dcf08b, one commit on e8324ea31, the head of microsoft/openvmm#5249, which NVX pinned before this commit: - virtiofs: say that inodes deduplicate only within a volume. The comment of insert_inode says that an inode already in the map is a candidate for the inserted inode's host object only within its volume, so a host object that two children of an aggregate reach gets a node in each, and that only a candidate of the same file type is reused; InodeMap's summary says that it indexes the inodes that insertions may reuse by DedupKey. It changes comments only. Nothing that NVX runs changes. No saved-state, protocol, or ABI format, and no version of any of them, changes. The protocol vectors and CPU profiles that nvx copies are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…he OpenVMM roadmap Map position 358, the commit of microsoft/openvmm#5251, which NVX now pins at 7e94a090a, 232 commits past the mapped tip: - 358, virtiofs: say that inodes deduplicate only within a volume. The comment of VirtioFs::insert_inode says that an inode already in the InodeMap is a candidate for the inserted inode's host object only within that inode's volume, by its host device and inode numbers on a volume with stable file IDs and by its path on any other, so a host object that two children of an aggregate reach gets a node in each, and that only a candidate of the same file type is reused. It said that an inode with the inserted inode's device and inode number was returned on a file system with stable inode numbers, which reads as a key across volumes. InodeMap's summary says that it indexes the inodes that insertions may reuse by DedupKey, not that it tracks inodes by their inode number. It changes comments only. Position 358 is not yet assigned to a PR. In lib.rs, it changes the comment of insert_inode, to which position 329 adds the device, and upstream's summary of InodeMap; PR06's position 010, PR13's position 048, PR18's positions 081 and 083, PR27's position 126, and eleven later positions also change the file, none of the lines that the commit changes. It changes nothing that a mapped PR adds, so it is no fixup, and it follows position 329. Upstream main, 5d6ab1cfa, keys a stable-ID volume's inodes by volume ID and inode number and has both comments, but for the device in that of insert_inode; replaying the commit there conflicts in that comment, so it cannot go upstream on its own. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5 tasks done
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The OpenVMM roadmap documentation update has no active review issues blocking approval.
No open issues 🎉
What changed in this PR
This PR pins OpenVMM’s comment-only clarification that virtio-fs inode deduplication is scoped to a volume, aligning the source documentation with NVX’s filesystem design and addressing #1905. Runtime behavior and compatibility remain unchanged.
Changes:
- Advances the documented OpenVMM pin to
7e94a090a, chain position 358. - Updates roadmap counts, ranges, and the chain diagram.
- Records the clarification’s scope, dependency on position 329, and upstream applicability.
| File | Description |
|---|---|
doc/openvmm-upstream-roadmap.md |
Maps position 358 and explains the volume-scoped inode deduplication comments. |
Review effort: Balanced
5 tasks done
Pedro Henrique Penna (ppenna)
deleted the
agents/issue-1905-insert-inode-scope
branch
November 24, 2026 00:18
5 tasks done
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.
Fixes #1905
What does this pull request change?
It pins microsoft/openvmm#5251, which corrects two doc comments in OpenVMM's
vm/devices/virtio/virtiofs/src/lib.rsto say that the virtio-fs server deduplicates inodes only within a volume:VirtioFs::insert_inodesaid: "If the file system supports stable inode numbers and an inode already existed with this device and inode number, the existing inode is returned, not the passed in one." It now says that an inode already in the map is a candidate for the inserted inode's host object only if it belongs to the inserted inode's volume (seeDedupKey). On a volume with stable file IDs, the host device and inode numbers identify a candidate within that volume; the pair is not a key across volumes, so a host object that two children of an aggregate reach gets a node in each. On a volume without stable file IDs, the path identifies a candidate instead. A candidate of the same file type takes the new name and one more lookup, and is returned; one of another file type held an object that the host has since replaced, so the inserted inode gets a node of its own.InodeMapsaid that the map keeps track of in-use inodes "by their actual inode number". It now says that the map indexes the inodes that insertions may reuse byDedupKey.The OpenVMM commit changes comments only, so nothing that NVX builds or runs behaves differently.
No version is created or bumped: no ABI, machine-contract, time-ABI, snapshot, manifest, saved-state, or protocol version changes, in NVX or in OpenVMM, and no saved-state, snapshot, or on-disk format changes.
Commits:
openvmm: pin the comments that scope inode deduplication to a volumemoves the gitlink frome8324ea31, the head of [DO NOT REVIEW] vmotherboard: claim a device's PCI slot only once its unit spawns openvmm#5249, which openvmm: pin the PCI slots that failed chipset device adds leave free #2061 pinned andfeature/microvm/devnow holds, to7e94a090a80de4f5ac08a1ab74d1726da4dcf08b, the head of [DO NOT REVIEW] virtiofs: say that inodes deduplicate only within a volume openvmm#5251, and changes nothing else. The protocol vectors and CPU profiles thatnvxcopies are unchanged.doc: map the comments that scope inode deduplication to a volume in the OpenVMM roadmapmaps the new chain position, 358.Start with the two comments in microsoft/openvmm#5251, then compare them with
InodeMap::insert,InodeMap::dedup_entry, andInodeMap::reusesin the same file and withDedupKeyininode.rs.Left out: the inline comment in
VirtioFs::createthat says the insert "can return an existing inode if it found a match on the inode number" stays, sincecreateinserts an inode of its parent's volume and so states no key across volumes;microvm::fs::insert_inodehas no doc comment to change. No NVX documentation changes: section 3.6.4 ofdoc/design/3.6-host-filesystem.mdhas stated this invariant since #1875.Why is this change needed?
#1875 corrected section 3.6.4 of the host filesystem design, which says that the server matches a volume's objects by host device and inode number, or by name on volumes whose inode numbers are not stable, and that an object that matches a node but has another file type gets a node of its own. The source comment of
insert_inodestill described a match on device and inode number without the volume. That reads as a key over the whole file system, across the children of an aggregate, and leaves out the file type that a match needs and the volumes without stable file IDs, so the two descriptions suggested different invariants to maintainers. The code was already right: both forms ofDedupKeyhold the volume ID,Ino(volume_id, device_nr, inode_nr)andPath(volume_id, path), andInodeMap::reusesreuses only a candidate of the inserted inode's file type.As the issue asks, the new comment does not claim that every file system has stable file IDs:
lxutilreports them always on Linux, and on Windows only for a file system that can open files by ID (FILE_SUPPORTS_OPEN_BY_FILE_ID).Upstream main,
5d6ab1cfa, keys stable-ID volumes by(volume ID, inode number)and has both comments, but for the device in that ofinsert_inode, which the chain's position 329,virtiofs: deduplicate inodes by device and inode number, added. The commit does not apply there as it is, since it changes that comment.How was this change validated?
Checks and results:
cargo check,cargo clippy --all-targets, andcargo doc --no-depsforvirtiofs, the last withRUSTDOCFLAGS=-D warnings, with and without--document-private-items, which checks the new intra-doc links, are clean, but for theLNK4199linker message that every linked artifact gets on this machine;cargo nextest run --profile agent -p virtiofspasses, 230 pass and 3 skipped;cargo xtask fmt --fixchanges nothing.python scripts/local_gates.py --base origin/agents/issue-1904-pci-slot-rollback --only test-changes markdown-links test-layout openvmm-vectors openvmm-cpu-profiles --runon Windows: all five pass.python scripts/openvmm_pin.py check-branch --topic --target origin/agents/issue-1904-pci-slot-rollbackandpython scripts/openvmm_pin.py check-roadmap --worktreepass;python scripts/openvmm_pin.py source 7e94a090a80de4f5ac08a1ab74d1726da4dcf08b --pr 5251reports a good signature and the pull request's head;python scripts/nvx.py verifyandpython scripts/check_markdown_links.pypass.git diff --submodule=diff origin/agents/issue-1904-pci-slot-rollback HEAD, found nothing; a reread of the roadmap's new remark narrowed what it says the summary ofInodeMapstates, which is folded in.python scripts/openvmm_pin.py land 7e94a090a80de4f5ac08a1ab74d1726da4dcf08b --remote origin, a dry run, finds a fast-forward offeature/microvm/dev.build artifacts (for VMM tests) [x64-linux]to a shutdown signal (exit code 143) duringcargo build igvmfilegen, which skipped every VMM test, so this pull request'sOpenVMM CI of the pinned revisionfailed on the skippedrun vmm-tests [x64-linux-intel-mshv]. The failed jobs' one rerun, the run's second attempt, passed all six jobs that NVX requires: unit tests on x64-linux and x64-windows, and VMM tests on x64-linux-amd-kvm, x64-linux-intel-mshv, x64-windows-intel, and x64-windows-amd. Its SNP and TDX VMM tests, and theopenvmm checkin gatessummary that they fail, are not among them.OpenVMM CI of the pinned revisionand theRequired status checkthat depends on it, which passed in its second attempt, once OpenVMM's rerun had passed.Backend, host OS, host type, and guest: none locally. The change is comment-only and changes no code that NVX builds or runs, so it needs no local microVM run; the unit tests ran on Windows 11, local, and CI ran the microVM scenarios on KVM and MSHV Linux virtual machines and on WHP Windows virtual machines.
Left to CI: nothing more for this head; the merge group's run checks the change on top of
dev.Checklist
python3 scripts/check_test_layout.pychecks.python3 scripts/check_test_changes.py --base origin/devlists no changeto an existing test, or a Changes to existing tests section below
explains each one.
.github/copilot-instructions.mdand the skills when a convention orworkflow changes.
nvxupdatesnvx/public-api/withpython3 scripts/public_api.py --update.description says how the change versions or migrates them.
OpenVMM pin
e8324ea31, the head of [DO NOT REVIEW] vmotherboard: claim a device's PCI slot only once its unit spawns openvmm#5249:7e94a090avirtiofs: say that inodes deduplicate only within a volume.7e94a090a80de4f5ac08a1ab74d1726da4dcf08b, the pull request's exact head, with a good signature.b73db6676(openvmm: FUSE session retains negotiated values when the INIT reply cannot be sent #1898), and [DO NOT REVIEW] vmotherboard: claim a device's PCI slot only once its unit spawns openvmm#5249,e8324ea31(openvmm: failed PCI device construction leaves the bus slot registered #1904), have landed:feature/microvm/devis ate8324ea31, the parent of the pinned commit, whichdevpins since openvmm: pin the PCI slots that failed chipset device adds leave free #2061. The commit itself needs only position 329, which added the device to the comment and toDedupKey, and whichfeature/microvm/devhas.b73db6676ontoe8324ea31without conflicts, andgit range-diffshows the patch unchanged.InodeMapand the comment ofinsert_inode, to which position 329 added the device, and nothing that a mapped PR adds, so it follows position 329. It does not apply to upstream main,5d6ab1cfa: replaying it there conflicts in that comment. The pin is 232 commits past the mapped tip.dev; its own commits are the two above.feature/microvm/devfrome8324ea31to7e94a090a80de4f5ac08a1ab74d1726da4dcf08b(OpenVMM's merge button squashes, which would leave the pin off the branch); then merge this pull request.