The Apple Filesystem

16/10/2017
Author Avatar
Thomas Debouverie
Expert Software Engineer, EASI

HFS+

The HFS+ filesystem was created by Apple almost 30 years ago. Since then, it has been
the filesystem used on all Apple consumer devices, from iMacs, to MacBooks, iPods & iPhones.

It has served very well, delivering what most filesystem do. Amongst other features:

  • Control how data is stored and retrieved
  • Give access to a file hierarchy, with folders and files
  • Managing authorization to access these folders and files
  • Ensuring data integrity

In the meantime, the hardware and security requirements have evolved dramatically. It was time to modernize.

The Apple Filesystem

Creating a filesystem is not something you do every year. You'd better be sure that the new one contains all the features you will need at least for the next 10 years. 

Today's storage hardware in portable devices and personal computers has changed. Spinning hard disks tend to disappear to the benefit of flash drives. We also are much more sensitive to the security of our data.

The Apple Filesystem takes these two major points as the main features. All file access and operations are optimised for flash drive, and strong encryption is built-in. 

It contains many other features, let's dive into one.

Clones

A clone is a nearly instantaneous copy of a file or directory that occupies no additional space. After copy, both files points to the same data area of the drive.

apple filesystem

When one of the files is modified, only the differential data is written elsewhere on the drive.

apple filesystem

This feature allows multiple copies of the same file to take almost no additional space. Since it is built directly into the filesystem, no additional effort is required from the developers.

If you want to know about other features, you can browse through the official documentation here.

Invisible update

As a software engineer, working on solutions used by hundreds of users, changing something fundamental about an app can be very delicate and stressful. Imagine doing the same on hundreds of millions of iPhones simultaneously... It's mind-boggling.

That's exactly what Apple did recently. If you did not know, since you have installed iOS 10.3 or later, your entire filesystem has been converted from HFS+ to Apple Filesystem. That is also the case if you have installed the latest macOS version on an Apple computer.

To do this flawlessly, Apple did this conversion before, in the iOS 10.1 and 10.2 updates. During the conversion, the upgrade process systematically checked for any errors. At the end, it rolled back all changes to HFS+, and reported back the results to Apple.

Results

The final conversion was a success, but not entirely flawless. Update 10.1 had several issues: it was huge for a minor update, took a very long time, and forced Apple to release a corrective 10.1.1 very fast as users kept experiencing issues.

In the end, they still managed to engineer the spread of such a fundamental change to millions of users at the same time. This is quite a feat, and I think this method could inspire many software makers.
 

Current job openings

Sign up to our newsletter

Follow us

  

Share this article