by DigitalHackOp · 2y ago · 0 comments
The old filesystem was HFS+, released in 1998 and APFS was released in 2017.
APFS added encryption, data integrity checksums, copy on write, snapshots, logical volume support. The migration wasn't just a "search and replace the name and ship it", but an intensive re-writing of the filesystem metadata during the migration.
Released in 1998 for Mac OS 8.1. That HFS+ worked at all for Mac OS X was a minor miracle; it was absolutely not designed for use on a modern UNIX, and support for some features like deleting in-use files involved some egregious hacks (like temporarily stashing files in invisible directories).
Early Mac OS X did support UFS (not sure which variant, probably an early BSD?) but never fully and eventually removed it. HFS support for backwards compatibility was necessary, but making it the boot FS for so many years did hold the platform back.
There was talk about ZFS at one point, but it never happened - maybe due to licensing. A large variety of FSes is definitely something Linux has over BSD and permissive licensed software. Even ZFS isn't fully permissive which only leaves HAMMER(2) as the FS with next-gen features and a BSD license.
At the same time, it's impressive that the basic design of HFS held up as well as it did! HFS was initially introduced in 1985, and HFS+ was a fairly conservative update to support larger volumes (and, later, metadata journaling).
> There was talk about ZFS at one point, but it never happened - maybe due to licensing.
That seems very likely. Apple's experiments with ZFS ended around 2009, right about the same time that Oracle finalized their acquisition of Sun.
Since then ZFS has improved and machines have become faster.
e.g. case sensitive vs insensitive, different path separators : vs / , lack of file IDs on UFS, resource forks, hard links and the above mentioned deleting files that are open.
[0] https://www.usenix.org/techsessionssummary/challenges-integr...
I believe it has checksums on its own metadata, but no checksums on actual user data. So you won't lose a whole folder or volume due to bitrot, but it doesn't provide protection against a flipped bit in one of your photos.
"The APFS engineers I talked to cited strong ECC protection within Apple storage devices. Both flash SSDs and magnetic media HDDs use redundant data to detect and correct errors. The engineers contend that Apple devices basically don’t return bogus data."
Note this continues for a bit and criticises that position. Also see the HN discussion at the time: https://news.ycombinator.com/item?id=11934457
I don't think it's a good decision either; obviously you can run systems without checksums (we've been doing so for decades) but "netter safe than sorry" seems to be the smart thing. It's pretty cheap to checksum data, which is why all the next-gen filesystems (ZFS, btrfs, bcachefs) do so.