Live data from Hacker News

HFS+ is crazy

liminality.xyz

71–80 of 211 posts

Re: HFS+ is crazy

#71
post #36
post #24

> Applications — even basic filesystem tools — aren't aware of the additional content. How do you deal with a file with two sets of data? I'm sure there's an Apple-y reason for the existence of this feature, but I can't imagine what it might be. G.K. Chesterton on the matter: In the matter of reforming things, as distinct from deforming them, there is one plain and simple principle; a principle which will probably be…

I prefer the less verbose version: "Don't just do something. Stand there." --Marvin Minsky

Damn, I knew this quote for 2+ decades, and I thought it was just a funny wordplay, reversing the usual wording.

Only now with your comment it occurred to me it has the same sense with the Chesterton quote, that it's against "just doing something" mindlessly!

Re: HFS+ is crazy

#72

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…

My hunch is that they've got something brewing that is optimized for a post-SATA, SSD-only world, and they won't release it until that describes most/all of their product line.

Re: HFS+ is crazy

#73

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…

You wouldn't put the entire content of a file in an extended attribute, would you?

There are various arbitrary restrictions in various filesystems and operating systems. The intention is to store smaller amounts of useful information with the file. Smaller means in the bytes/kilobytes range. For example you wouldn't store multi-gigabyte alternate language versions of a video file in its extended attributes. But you could store URLs of where to get them.

Or you could attach authorship, review, dates, keywords and similar metadata which would work for any file type, not just those whose format explicitly has that support.

If you want to get a handle on what filesystem design is like then I highly recommend Dominic Giampaolo's book on the design and implementation of the Be filesystem (he wrote BeFS). The book is freely available from his website as http://www.nobius.org/~dbg/practical-file-system-design.pdf and includes information about the design of other filesystems too. It isn't exhaustive, but does give a very good grounding in filesystems and does cover extended attributes.

Re: HFS+ is crazy

#74

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…

You wouldn't put the entire content of a file in an extended attribute, would you?

On Mac Classic, if you wanted to ship a custom font with your application, you'd put it in the Resource fork in a resource of "FONT" type.

So why wouldn't a stand-alone font file consist of a Resource fork with a single resource of "FONT" type? Otherwise, the OS engineers have to develop two entirely different ways of reading in font data. Why duplicate the effort?

The system made perfect sense, both then and now. It bothers me that so few people know anything about Mac Classic, it really was an amazingly well-designed OS for its time.

Re: HFS+ is crazy

#75
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.

[deleted]

Re: HFS+ is crazy

#76
post #30

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…

I hope you're not right. There are so many wonderful filesystems already out there, many of them already Open Source. I'm not against research, but I'd rather have Apple fund one of these existing efforts.

Which? Apple won't adopt anything GPL, so BTRFS, XFS, JFS, etc--basically every Linux project is right out. It was almost ZFS, years ago, but Apple backed out when Oracle bought Sun. What out there is modern, good, and under a compatible license? HAMMER?

Re: HFS+ is crazy

#77
Another fun issue in OS X HFS+ happens due to unicode normalization; any filename containing an ignorable unicode character is first normalized:

cat /etc/passwd`python -c 'print "\xe2\x80\x8c"'`

This led to a security issue with Git (http://git-blame.blogspot.com/2014/12/git-1856-195-205-214-a...) and one in Apache a few years earlier.

Re: HFS+ is crazy

#78

It's amazing how garbage like this always rockets to the top of HN. This guy doesn't know anything about file systems or about the operating system he's using. But he sounds confident, so that's evidently good enough for a lot of people. If you think it's crazy that a file system supports multiple data forks/steams, then you don't know very much about file systems. If you think it's crazy that an operating system mai…

People don't know what they don't know. Talking down to people who think something is strange for being the way it is, instead of explaining to them why it is, is so counterproductive and serves no purpose. Everyone has things they don't know, just provide an explanation instead of an arrogant comment.

He even says "I'm sure there's an Apple-y reason for the existence of this feature, but I can't imagine what it might be." That's literally a "i'm not sure why this is" right there!

Re: HFS+ is crazy

#79

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…

Is it possible that Apple are waiting until all of their computers have 100% flash storage before switching to a new file-system?

Re: HFS+ is crazy

#80

It's amazing how garbage like this always rockets to the top of HN. This guy doesn't know anything about file systems or about the operating system he's using. But he sounds confident, so that's evidently good enough for a lot of people. If you think it's crazy that a file system supports multiple data forks/steams, then you don't know very much about file systems. If you think it's crazy that an operating system mai…

Do you think that a flag for irrelevant content would help? Or just plain flagging?
Post reply on HN