Opened 6 weeks ago
Last modified 6 weeks ago
#69555 new enhancement
Use cloning to activate port images on APFS
Reported by: | jmroot (Joshua Root) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | |
Keywords: | Cc: | ||
Port: |
Description
Background on why things are the way they currently are: #13143, #13601, #19458
Our current way of handling port images predates APFS by many years. Some of the problems it was intended to solve may no longer be relevant on modern systems.
Storing port images as extracted directories and using COPYFILE_CLONE to activate their files could improve performance a lot. Cloning rather than hard linking (as was done historically) would prevent changes to the activated files from affecting those in the image, because of the COW semantics. Hopefully Time Machine also handles APFS clones better than it historically handled hard links.
Since a lot of installations are done from downloaded archives anyway, it probably makes sense to always create an intermediate archive when installing from a local destroot. This handily solves the hard link detection problem and is also one of the easiest ways of applying HFS compression. We could have an option to keep the archive as well if desired (such as on the buildbot).
We would of course have to fall back to the current method on non-APFS filesystems, and when the image directory is on a different volume than the activated location.
Change History (2)
comment:1 follow-up: 2 Changed 6 weeks ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 6 weeks ago by jmroot (Joshua Root)
Replying to ryandesign:
The activated location could span multiple volumes.
We already behave suboptimally in that case, so no regression.
Replying to jmroot:
The activated location could span multiple volumes.