HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
apple-oss-distributions
hfs
C2022–2026
apple-oss-distributions / hfs

hfs

Discover this repository through its Hacker News conversations.

3Distinct people
3Mentions
0Explicit recommenders
42GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A public description has not been verified.

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year3 dated mentions

Observed mentions: 2022-02-22 02:27:26 UTC to 2026-06-03 16:57:40 UTC.

012022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

3 sources
I would consider HFS+ to be a legacy filesystem at this point, something you shouldn't use without a really good reason (interop with pre-macOS 10.13 machines being the only one I can think of). Fun fact: HFS dates back to the 80s, and so does the fsck code. https://github.com/apple-oss-distributions/hfs/blob/main/lib... still contains '#if BSD' blocks for the Mac OS X code, and classic Mac code in the '#else'. And 'dfalib' refers to 'Disk First Aid', the classic Mac fsck application.
In I Found a Bug in Apple's Fsck_hfs
I just looked into this, since what you say and what Apple’s documentation says are two different things. Here is Apple’s documentation: https://devstreaming-cdn.apple.com/videos/wwdc/2019/419ef9ip... F_BARRIERFSYNC: fsync() with a barrier F_FULLFSYNC: Drive flush its cache to disk This sounds like the Linux fsync() and Linux syncfs() respectively. What you say is that F_FULLFSYNC is the same as Linux fsync() and your performance numbers back that up. Unfortunately, you would only see a difference between Linux fsync() and Linux syncfs() if you have files being asynchronously written at the same time as the files that are subject to fsync()/syncfs(). fsync() would only touch the chosen files while syncfs() would touch both. If you did not have heavy background file writes and F_FULLSYNC really is equivalent to syncfs(), you would not be a
Read the rest
ble to tell the difference in your tests. That said, let’s look at how this actually works on Mac OS. Unfortunately, the apfs driver does not appear to be open source, but the HFS+ driver is. Here are the relevant pieces of code in HFS+: https://github.com/apple-oss-distributions/hfs/blob/hfs-556.... https://github.com/apple-oss-distributions/hfs/blob/5e3008b6... First, let me start with saying this merits a faceplam. The fsync() operation is operating at the level of the mount point, not the individual file. F_FULLSYNC and F_BARRIERFSYNC are different, but they both might as well be variants of the Linux syncfs(). For good measure, let us look at how this is done on the MacOS ZFS driver: https://github.com/openzfsonosx/zfs/blob/master/module/zfs/z... The file is properly synced independently of the mountpoint, such that other files being modified in the file are not immediately required to be written out to disk. That said, both F_FULLSYNC and F_BARRIERFSYNC on MacOS are mapped by the ZFS driver to the same function that implements fsync() on Linux: https://github.com/openzfs/zfs/blob/master/module/os/linux/z... For good measure, let us look at how syncfs() is implemented by ZFS on Linux: https://github.com/openzfs/zfs/blob/master/module/os/linux/z... It operates on the superblock, which is what MacOS’ HFS+ driver does. From this, I can conclude: Linux syncfs() == macOS F_FULLFSYNC on HFS+ Linux fsync() == macOS fsync()/F_FULLFSYNC/F_BARRIERFSYNC on ZFS Also, MacOS F_BARRIERSYNC is a weakened Linux syncfs() and Apple’s documentation is very misleading (although maybe not technically wrong). POSIX does allow fsync to be implemented via syncfs (sync in POSIX, but I am saying syncfs from Linux to be less confusing). However, not issuing and waiting for the completion of an IO barrier on fsync is broken behavior like you claim. I am not sure how MacOS APFS behaves. I imagine that additional testing that takes into account the nuances in semantics would be able to clarify that. If it behaves like HFS+, it is broken. Edit: Upon further examination and comparing notes with the MacOS ZFS driver team lead, it seems that HFS+ is syncing more than requested when F_FULLFSYNC is used, but less than the entire filesystem. You are fine treating it as a Linux fsync. It is close enough.
In Apple's custom NVMes are amazingly fast – if you don't care about data integrity

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.