Live data from Hacker News

HFS+ is crazy

liminality.xyz

11–20 of 211 posts

Re: HFS+ is crazy

#11
I'd like to see Apple adopt the HAMMER2 filesystem from DragonflyBSD. It's a very full-featured filesystem, with snapshots, file history, and hashes for integrity checking. Snapshots could integrate with Time Machine, and file history with Apple's file versions feature.

It doesn't have as many features as ZFS or Btrfs, but it's much better than HFS+. Plus it's BSD-licensed and unencumbered by patents, so Apple could do whatever they want with it.

Re: HFS+ is crazy

#12
post #3

This is why it was really disappointing that Apple had to abandon ZFS. ZFS is one of the best file systems available and because Oracle owns it it is virtually unusable in most contexts. I wonder if Apple can afford to buy out Oracle at this point, take ZFS and wind up the useless parts.

Apple abandoned ZFS when Steve Jobs was still alive. Larry Ellison has frequently described Steve Jobs as one of his best friends whom he frequently went on walks with. The idea that Steve could not have gotten Larry to license ZFS seems crazy to me.

ZFS was in the middle of a lawsuit at the time. Larry may have been willing to license it, but I doubt he was willing to indemnify.

Re: HFS+ is crazy

#13
Resource forks aren't anything new - it's existed since the dawn of macs - if you haven't known about resource forks while working with macs maybe you should learn a bit more about the core of the platform.

That said, I agree, it's a horrible design - but it's existed for 20+ years already.

For me, this is just like saying "hey people! FAT is horrible, it only allows 8 character + 3 character extension file names!"

Re: HFS+ is crazy

#14
HFS+ isn't so much "crazy" as it is "really friggin old". It's not much more than a coat of paint on top of HFS, which was introduced in 1985 (!), and thus is missing out on the last three decades of filesystem research.

I might be too optimistic, but I've been assuming that Apple started development on a replacement for HFS+ as soon as the ZFS deal collapsed. I know that was years ago, but filsystems take a looooong time to get right. It's coming, guys, I promise!

Re: HFS+ is crazy

#15
post #11

I'd like to see Apple adopt the HAMMER2 filesystem from DragonflyBSD. It's a very full-featured filesystem, with snapshots, file history, and hashes for integrity checking. Snapshots could integrate with Time Machine, and file history with Apple's file versions feature. It doesn't have as many features as ZFS or Btrfs, but it's much better than HFS+. Plus it's BSD-licensed and unencumbered by patents, so Apple could…

That would be sweet, indeed. How far along is HAMMER2 these days?

Re: HFS+ is crazy

#16
post #4

Isn't the point of resource forks to store structured data; like a font bitmap? The pictured font looks like a third party font, suggesting whoever exported it for release chose to export in such a way that data was only stored in the resource fork, perhaps as a lazy-man's DRM

It's a font in the old Suitcase format from classic Mac OS-- it's not a lazy-man's DRM; it was the way fonts were supposed to be stored. Fonts were resources, so their data went into the file's resource fork.

Re: HFS+ is crazy

#17

Nobody else really uses them to the extent Apple does, but this sort of thing isn't unique to HFS+. https://en.wikipedia.org/wiki/Extended_file_attributes You can do the exact same thing on Windows (on an NTFS volume), just go to a command prompt and run "notepad hello.txt:secret" and see how DIR and Windows Explorer deal with it.

"Alternate Data Streams." https://en.wikipedia.org/wiki/Fork_%28file_system%29#Microso...

Re: HFS+ is crazy

#18
post #2

TLDR: Mac filesystems have resource forks. I guess the author has not used Macs too much, as they have been around since the 1980's.

TLDR: all standard applications for working with files are unaware of resource forks. This is confusing, and hurts new computer users. #consideredharmful

Re: HFS+ is crazy

#19
post #15
post #11

I'd like to see Apple adopt the HAMMER2 filesystem from DragonflyBSD. It's a very full-featured filesystem, with snapshots, file history, and hashes for integrity checking. Snapshots could integrate with Time Machine, and file history with Apple's file versions feature. It doesn't have as many features as ZFS or Btrfs, but it's much better than HFS+. Plus it's BSD-licensed and unencumbered by patents, so Apple could…

That would be sweet, indeed. How far along is HAMMER2 these days?

Not far enough for Dragonfly to use it. There's a greater chance of Apple adopting BTRFS (i.e., not a snowball's chance in hell).

Re: HFS+ is crazy

#20
Alternate parts to the main file are present on several platforms, and have the same problems. They are called resource forks on Mac.

On Windows/NTFS they are called alternate data streams - https://en.wikipedia.org/wiki/Fork_(file_system) - to use specify a colon and name after the filename (eg example.txt:myads).

On Unix, Linux, OS/2 etc you can find extended attributes - https://en.wikipedia.org/wiki/Extended_file_attributes - which allow storing key value pairs on a file. Restrictions exist and vary.

As for an example of them being helpful - on Windows when you download a file from the Internet using a browser an extended attribute is used to mark that. Trying to execute the file from Explorer then explains that it was downloaded and asks if you really want to proceed.

On Linux selinux can store labels in the extended attributes.

Older ignorant tools aren't going to know about this, but don't substantially harm anything. Modern tools do know about them and do the right thing. (eg copying a downloaded file elsewhere on Windows will still give the warning). The Linux GNU cp command does require a --preserve xattr flag to copy extended attributes and does not do so by default. Dropbox does support them by default and cross platform.

Post reply on HN