by Swapnil Bhartiya

Linus Torvalds: Apple’s HFS+ is probably the worst file system ever

Jan 13, 20154 mins
LinuxOpen SourceOperating Systems

Itu2019s been a long time since we heard a good rant from Linus Torvalds. He doesnu2019t rant much, but when he does he hits the nail on the head and he doesnu2019t mince words.

In December 2014,a critical vulnerability was found in Git that affected Mac OS X and Windows users. Even if the vulnerability didn’t affect Linux users, it could harm users who work on Windows or Mac systems.

A patch was released immediately, but that wasn’t soon enough to keep Linus from yelling out loud about how horrible Apple’s HFS+ file system is. As an Apple user, and as much as I love their hardware, I am not a fan of their software.

[ Next read: 11 technologies that tick off Linus Torvalds ]

So what’s the basic problem with HFS+? Both NTFS and HFS+ are case insensitive, which means if you have a folder named ‘Linux’ or ‘linux’ they will treat them as the same folder, which understandably causes a lot of problems. Thomas Pfeiffer, a usability consultant to KDE, refers to an article by Brian Tiemann and says case-insensitive but case-preserving file systems are actually a good idea from a desktop user’s point of view.

Linus says, “Quite frankly, HFS+ is probably the worst file-system ever. Christ what shit it is. NTFS used to have similar issues with canonicalizing utf8 (ie: using non-canonical representations of slashes etc). I think they at least fixed them. The OS X problems seem to be fundamental.”

He goes on to say that HFS was not developed to be a good file system:

The true horrors of HFS+ are not in how it’s not a great filesystem, but in how it’s actively designed to be a bad filesystem by people who thought they had good ideas.

The case insensitivity is just a horribly bad idea, and Apple could have pushed fixing it. They didn’t. Instead, they doubled down on a bad idea, and actively extended it – very very badly – to unicode. And it’s not even UTF-8, it’s UCS2 I think.

Ok, so NTFS did some of the same. But apple really took it to the next level with HFS+.

There’s some excuse for case insensitivity in a legacy model (“We didn’t know better”). But people who think unicode equivalency comparisons are a good idea in a filesystem shouldn’t be allowed to play in that space. Give them some paste, and let them sit in a corner eating it. They’ll be happy, and they won’t be messing up your system.

And then picking NFD normalization – and making it visible, and actively converting correct unicode into that absolutely horrible format, that’s just inexcusable. Even the people who think normalization is a good thing admit that NFD is a bad format, and certainly not for data exchange. It’s not even “paste-eater” quality thinking. It’s actually actively corrupting user data. By design. Christ.

And Apple let these monkeys work on their filesystem? Seriously?

I can share my own experience regarding some of Apple software, including Finder, which in my opinion is the worst file manager ever.

Even John Gruber of Daring Fireball and inventor of Markdown was not a huge fan of Finder. He once wrote, “It’s my guess that the OS X Finder was designed and implemented by former NeXT engineers who neither used (nor liked) the original Finder nor understand the needs of Mac users who do.”

Going back to HFS+, Linus says Apple may have a lot of reasons to not move to other file systems, but they could have at least improved HFS+:

There are lots of good reasons to not move to ZFS (cough-Oracle-cough), but they could have pushed people to case-sensitive HFS+, which would have then made it much easier to (in the long run) migrate to anything else saner. But no. There is a case sensitive option, but Apple actively hides it and doesn’t support it.

The stupidity, it burns.

So you had all these people who made really bad decisions and actively coded for them. And I find that kind of “we actively implement shit” much more distasteful than just the “ok, we don’t implement a lot of clever things” that John complained about.

Should we expect Apple to get their act together and fix the issue? I very much doubt it. Apple is like the weather; it pays no attention to criticism.