It was a massive change, but one they prepared for by having the same migration happen on laptops/desktops
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).
I'm still shocked that they went with HFS+ for so long, for all its shortcomings.
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.
> I'm still shocked that they went with HFS+ for so long, for all its shortcomings.
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.
At the time ZFS on FreeBSD came with some pretty serious caveats regarding performance and memory usage. It was pretty clearly designed for servers and not really the sort of thing designed to run on your laptop, much less iPhone. Apple probably made the right choice for technical reasons alone.
Since then ZFS has improved and machines have become faster.
Apple wrote an interesting article[0] way back in 2000 about some of difficulties in integrating Unix/Mac, especially files and filesystems.
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.
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.
I wonder why they don't do checksums on data. Too complex? Is bitrot not a common problem on modern SSDs? It's also not clear what should a user do after they've received a notification that a scrub found a mismatch. It's not like you can replace the soldered on SSD... It would be still great for external ones though.
They claimed it's not needed because Apple hardware is very good; from [1]:
"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."
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.
Yeah it's strange and quite disappointing. Even if Apple devices never returned bogus data (doubtful), there's a whole industry of external disks, largely fuelled by Apple's ridiculous SSD prices, that you're putting APFS on and which are often of dubious quality. Then again, the interview is now 8 years old and they must have been working on something since.
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.
https://en.wikipedia.org/wiki/HFS_Plus
https://en.wikipedia.org/wiki/Apple_File_System