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
{{ message }}
Repository navigation
Commit d0a49cc
Browse filesBrowse the repository at this point in the historyBrowse files
doc: map virtio-fs renames between hard links in the OpenVMM roadmap
Map position 349, the commit of microsoft/openvmm#5215, which NVX now
pins at 2a483a06f, 223 commits past the mapped tip:
- 349, virtiofs: keep node names when renaming one hard link onto
another. After a successful rename on a POSIX host,
VirtioFs::rename changes no names when the source still reaches the
destination's object, as VirtioFsVolume::names_one_object tells from
the two names' host device and inode numbers. It tracked every
rename that is not an exchange as a move, so a rename between two
hard links of one object, which a Linux host carries out without
changing anything, left the node only the destination's name, after
which removing the destination left it none and saving a microVM
failed. A Windows host removes the source link, as the move records.
Position 349 is a PR13 fixup. It fixes the name bookkeeping that
PR13's position 048 adds, and its test, after position 340's in the
microVM exchange tests that position 166 adds, needs nothing that a
later position adds but position 340's RENAME_NOREPLACE, so it folds
into position 048 after position 340, and its test into position 166,
as the fold sentence after the DAG and the commit mapping say; the
Scope, the DAG, the dependency graph, the PR summary, and the commit
mapping record it with PR13. The alias preflight of PR18's position
081 still models the move, which can only be stricter than the names
that the rename keeps, so it is no PR18 fixup. Upstream main,
bf353460f, lacks the defect, since it lacks the names of position 048,
and replaying the commit there conflicts in lib.rs and inode.rs, next
to the code of positions 048, 160, and 332, and in the microVM's
exchange_tests.rs, which upstream main lacks, so it follows PR13
upstream.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
[Conflicts of the v6.1 rebase](#conflicts-of-the-v61-rebase), and
@@ -1934,6 +1941,7 @@ whose first 220 commits are those of `feature/microvm/release/v6.0`, and a v4.0
1934
1941
| 346 |`c819952cf`| - | - | - | - | - | - | virtiofs: serve a handle only for its node while the guest holds it (microsoft/openvmm#5212) |
1935
1942
| 347 |`a533d6a55`| - | - | - | - | - | - | virtiofs: refuse device nodes and whiteouts on a microVM share (microsoft/openvmm#5213); fold into 081, its tests into 164 |
1936
1943
| 348 |`1270a975b`| - | - | - | - | - | - | lxutil: do not mistake unmapped groups for the overflow GID (microsoft/openvmm#5214) |
1944
+
| 349 |`2a483a06f`| - | - | - | - | - | - | virtiofs: keep node names when renaming one hard link onto another (microsoft/openvmm#5215); fold into 048, its test into 166 |
1937
1945
1938
1946
The remarks that say whether commits apply to upstream main record what was found on upstream main
1939
1947
when each commit was mapped: the v3.0 reorganization's base, `b2676222b`, for the commits that it
@@ -1944,7 +1952,7 @@ and `c0694c4da`, upstream main on 2026-11-16, for positions 297-306, `c4419be15`
1944
1952
main on 2026-11-19, for positions 321-324, `78af54a51`, upstream main on 2026-11-20, for position
1945
1953
325, `d83f87209`, upstream main later that day, for position 326, `265f0a73f`, upstream main
1946
1954
later still, for positions 327 and 328, and `bf353460f`, upstream main on 2026-11-21 and the v7.2
1947
-
fork base, for positions 329-334 and 340-348.
1955
+
fork base, for positions 329-334 and 340-349.
1948
1956
They name the positions that the commits have now, but neither the v7.2 rebase on `bf353460f`, the
1949
1957
v7.1 rebase on `9a875b563`, nor the v7.0 reorganization on `e6b458cc0` checked them again, nor did
1950
1958
the v6.1 rebase check the earlier ones on `7d90c4104`.
@@ -4594,6 +4602,45 @@ Upstream main lacks the defect, since it lacks caller ownership and `credentials
4594
4602
commit there conflicts in `credentials.rs` and the Guide's virtio-fs page, which upstream main
4595
4603
lacks, so it cannot go upstream on its own.
4596
4604
4605
+
Position 349 has `VirtioFs::rename` keep every node's names when the guest renames a hard link onto
4606
+
another link of the same object on a POSIX host (microsoft/nvx#1620). PR13's position 048 records
4607
+
the names through which the guest reaches each node, which hard links share, and tracks a rename
4608
+
that is not an exchange as a move: it drops the names at and below the destination, which the host
4609
+
replaced, and then rewrites those at and below the source under the destination. A Linux host
4610
+
succeeds at a rename between two links of one object without changing anything, as POSIX requires,
4611
+
so the node kept only the destination's name although the source still reached its object: once the
4612
+
guest removed the destination, the node had no name left, its requests failed with `ENOENT`, and
4613
+
saving a microVM failed the check of PR18's position 083 that every node has a name. After a
4614
+
successful rename on a POSIX host, the commit changes no names when the source still reaches the
4615
+
destination's object, which a new `VirtioFsVolume::names_one_object` tells by the host device and
4616
+
inode numbers of the two names. It decides from the host's result rather than from the names before
4617
+
the rename, since through overlayfs two hard links in a lower layer report one device and inode
4618
+
number, yet the rename still moves one onto the other. A Windows host removes the source link
4619
+
instead, which the move already records, and a rename that changes only the case of a name leaves
4620
+
its old spelling reaching the object there, so the check stays off on Windows. The microVM alias
4621
+
preflight that PR18's position 081 adds and position 160 extends to exchanges still models the move
4622
+
before such a rename; the names that the rename keeps are the table as it was, which already fits
4623
+
the limits, so the preflight can only be stricter than needed, and the commit fixes no defect of
4624
+
position 081. It changes `rename` in `lib.rs`, upstream's code, to which position 048 adds the names
4625
+
that `rename` keeps, position 081 the preflight, position 160 the writability checks and the
4626
+
exchange, PR13's fixup at position 340 the early return, and PR18's fixup at position 347 the flag
4627
+
check, with a return between the host rename and the bookkeeping of positions 048 and 160, and none
4628
+
of the code that they add; PR06's position 010, position 083, PR27's position 126, positions 158,
4629
+
164, 322, 331, 332, 344, and 346, and PR18's fixups at positions 333 and 342 also change the file.
4630
+
It adds `names_one_object` to upstream's `VirtioFsVolume` in `inode.rs`, after the `root_device_nr`
4631
+
that position 332 adds, using only upstream's `supports_stable_file_id` and the `lstat` of the
4632
+
`LxVolume` that the volume dereferences to; positions 010, 048, 081, and 083, PR22's position 102,
4633
+
position 126, and positions 160, 165, 322, 331, and 334 also change the file. It adds a test after
4634
+
position 340's to the microVM's exchange tests, which position 166 adds and position 340 extends,
4635
+
using position 340's `RENAME_NOREPLACE`, and widens their module documentation to cover it. It fixes
4636
+
a defect of position 048 and needs nothing that a later position adds but position 340's test and
4637
+
its `RENAME_NOREPLACE`, so it is a PR13 fixup: fold it into position 048, after position 340, with
4638
+
its `names_one_object` anywhere in `VirtioFsVolume`'s impl, and its test into position 166, after
4639
+
position 340's. Upstream main lacks the defect, since it lacks the names that position 048 adds.
4640
+
Replaying the commit there conflicts in `lib.rs`, next to the names and checks of positions 048 and
4641
+
160, in `inode.rs`, next to the `root_device_nr` of position 332, and in the microVM's
4642
+
`exchange_tests.rs`, which upstream main lacks, so it follows PR13 upstream.
4643
+
4597
4644
## PR summary
4598
4645
4599
4646
Each count is of v7.2 commits, which include the fixups that the v3.0, v4.0, v5.0, v6.0, and v7.0
@@ -4617,7 +4664,7 @@ reorganizations folded into them; see [The v7.0 reorganization](#the-v70-reorgan
4617
4664
| PR10 | U | Portable CPU and clock state | 015-027 |`9f254770b..fea603ce9`| 13 | PR09 |
- 037 `9d5bde6b6` - virtio: add device-private saved state and restore it while the device is stopped (v6.1 035, v6.0 039, v4.0 044, v3.0 053, v2.4 053; folds v2.4 372; rewritten by the v4.0 reorganization to restore device-private state into the stopped device, for microsoft/nvx#1232)
0 commit comments