Hey, So Apple held its WWDC event last week, and among other things, they talked about improvements they've made to filesystems in macOS[1]. Among other things, one of the things introduced was a concept of "firm links", which is something like NTFS' directory junctions, except they can cross (sub)volumes. This concept makes it easier to handle uglier layouts. While bind mounts work kind of okay for this with simpler configurations, it requires operating system awareness, rather than being setup automatically as the volume is mounted. This is less brittle and works better for recovery environments, and help make easier to do read-only system volumes while supported read-write sections in a more flexible way. For example, this would be useful if a volume has two subvolumes: OS and data. OS would have /usr and data would have /var and /home. But, importantly, a couple of system data things need to be part of the OS that are on /var: /var/lib/rpm and /var/lib/alternatives. These two belong with the OS, and it's incredibly difficult to move it around due to all kinds of ecosystem knock-on effects. (If you want to know more about that, just ask the SUSE kiwi team... it's the gift that keeps on giving...). Both /var/lib/rpm and /var/lib/alternatives are part of the OS, but they're in /var. It'd be great to stitch that in from the read-only OS volume into the /var subvolume so that it's actually part of the OS volume even though it looks like it's in the data one. It's completely transparent to everything. Supporting atomic updates (with something like a dnf plugin) becomes much easier because we can trigger snapshot and subvolume mounts with preserving enough structure to make things work. In this circumstance, we can flip the properties so that the new location has a rw OS and ro data volume mount for doing only software updates (or leave data volume rw during this transaction and merge the changes back into the OS). We could also do creative things with /etc if we so wish... Another thing that APFS seems to support now is creating linked snapshots (snapshots of multiple subvolumes that are paired together as single snapshot) for full system replication. Obviously, with firm links, it makes sense to be able to do such a thing so that full system replication works properly. As far as I know, it shouldn't be a difficult concept to implement in Btrfs, but I guess it wouldn't be really necessary if we don't have firm links... What do you guys think? [1]: https://developer.apple.com/videos/play/wwdc2019/710/ -- 真実はいつも一つ!/ Always, there's only one truth!
