Files
reims-vgpu/docs/graphics-kext
Anees Iqbal 95ca58c498 🐛 Correctness fix: keep a whole bundle through a placed update
A failed update on a placed system left no bundle at all. To write at the
bundle's path as before, the install removed the link and the placed tree,
the live bundle, before it staged; a stage or final rename that then failed
(a write error, a full Data volume) left nothing in /Library/GPUBundles or in
the placed directory, so that boot had no Metal device. Before placement the
swap always kept the old tree whole, as installBundle's comment promises.

The install now removes the link and moves the placed tree back to the
bundle's path, so the swap exchanges it whole and a failed install leaves it
there; the pass then places whichever tree is at the bundle's path, the new
one or the old. A link that cannot be removed, or a tree that cannot move
back (the link is made again), leaves the placement as it was and stages
nothing, and a link still at the bundle's path when the staged tree is to go
in stops the rename. A placement that finds no tree at the bundle's path
moves nothing, so a placed tree left by a pass that ended between the move
and the link stays for the next install to move back.

The rename looks both ends up without following a final link, as rename(2)
does: a followed link at the target handed VNOP_RENAME(X) the link's target,
a directory elsewhere, under the link's name and parent. The AppleGVA
preference's atomic write shares the rename.

The steps' order moves to rgfx_place.h, over the file system as a parameter,
and tests/place_test.cpp runs it over real directories with each step made to
fail in turn.
2026-12-03 02:32:00 -08:00
..