Differences Between NTFS and HFS+

I see “HFS+ sucks” from time to time, and as a Linux user who doesn’t think about proprietary filesystems much, it got me wondering; what are the actual differences between the two?

HFS+ NTFS
Endian-ness Big Little
Encoding UTF-16 UTF-16
Normalisation NFD1 ?2
Case-sensitive Both3 Both
Sparse File No Yes
Time Resolution 1 s 100 ns
Snapshots No No
Concurrent Access No ?
  1. The endian problem is not the fault of the filesystem, but rather the system you use to access it. Unless you go the ZFS route and have a bi-endian system.
  2. There is mention of HFS+ being not being exactly NFD, but I can’t find specifics
  3. I can’t find how or if NTFS normalises names.
  4. Case-insensitive by default on OS X, case-sensitive on iOS

Wikipedia: HFS+, NTFS

Linus Torvalds' rant on HFS+ being case-insensitive and normalised

Linus

Did anybody check that “…” can’t be fooled to do the same thing on HFS+? In particular, how does the character sequence “dot” “zero-width-utf8” and “dot” work? Or “zerowidth” “dot” “zerowidth”? Does it work like “…”? Because if it does, your fix is incomplete, and people can populate things in random places above the git tree.

Finally, did you check that “tolower” works on a ucs_char_t? It’s not supposed to, afaik.

Quite frankly, HFS+ is probably the worst filesystem 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.

Philip

For a great rant about HFS+ by +John Siracusa​ check out http://5by5.tv/hypercritical/56

Linus

+Philip Durbin I didn’t listen to all of it, but while +John Siracusa isn’t a fan of HFS+, he’s not even ranting about the true insanities of that filesystem.

Sure, it’s old. Sure, it does a horrible job of actually protecting your data. But those are more “it’s not a great filesystem” issues. They aren’t “that’s incredible crap designed by morons that have a hard time figuring out how to feed themselves”.

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 Applie 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?

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.

Rant over.

src

Stack Overflow NTFS’s MFT compared to ext3

Ars Technica John Siracusa review of HFS+ in OS X 10.7

1 Like

Meaningful and informative

I mean I hate ntfs even more than HFS+, but each his own.

Why do you hate it?

exFAT is the bane of future filesystems and open source compatibility because it is proprietary to MS, and the SD card association decided a proprietary file format was good enough to include in a standard, so exFAT can never be included in vanilla Linux until MS opens the format… (which they never will)

4 Likes

But have you forgotten microsoft :heart: linux and open source
(Can not find the source for this right now)

Welp NTFS has huge problems with data fragmentation, and it always getting corrupted. There are just way better file systems. I mean would it really be so hard for MS to use ext4?

1 Like

Does it? Never had/noticed anything like what you’re describing since Win 2000.
Any tools out there to check?

Um, not when it comes to gaming. They are telling Unity plugin devs to not develop plugins for Linux Unity builds just so it works better with DX11 on Xbox One.

And they only just rolled Windows 10 S into the same ecosystem as 10 Pro and 10 Home… Gabe should reconsider efforts for SteamOS if Windows 10 S becomes the default.

Well Windows is crap from the beginning to end. And all their effort in trying to push the UWP apps is just annoying.

Gabe let up on SteamOS when they still played nice… then Windows Store exclusives started happening, and if Windows 10 S becomes the default, SteamOS on Wayland will become the primary focus. Wayland libraries for the Vive haven’t even been made yet.

But exFAT being the default for SDXC is just… anti-FOSS in so many ways.

2 Likes

This ^ so much so that the MTP protocol is not smart enough to know when it is writing to a FAT/NTFS partition or a more robust partition. The MS way has pervaded into systems and protocols that it absolutely does not belong.

Things that are permissible in the *nix files systems cause errors and make MTP freak out. I seriously cannot transfer a file because it has a ? or ! in the name. My phone is using ext4 and I am transferring from an ext4 filesystem. If I adb shell into my phone, then I can rename the file correctly. Seriously?

1 Like

Just so we are on the same page; I haven’t used NTFS in 2018, and I have never used HFS+. I am not affiliated with MS in anyway and cannot comment on why MS doesn’t use ext4.

Just because I said that the post was “Meaningful and informative” does not imply that I give a fuck about either NTFS or HFS+.