NKESSLING@TERMINALSCREEN NOTEOpen to work from Nov 2026RTM 22:23:02 · UTC 20:23
>
NOTE ~/writing STORAGE
18 September 20267 min readby Noa Kessling

You also have to fsync the directory

Why a new file is not durable until its directory is, and the crash test that proved it.

NOTE · PLAIN TEXT

Why a new file is not durable until its directory is, and the crash test that proved it.

Why a new file is not durable until its directory is, and the crash test that proved it.

Creating a file writes two things: the file’s data and an entry in its directory. fsync on the file makes the first durable. It says nothing about the second.

The bug

tidewater rotated segments, fsynced the new file and started appending. After a power cut, the file existed but the directory had never been synced, so recovery never found it.

The fix and the test

Sync the directory after creating the file and before the first append. Then cut power at that exact point 40,000 times a night to make sure it stays fixed.

SUB NEWSLETTERMONTHLY

One note a month. No tracking pixels.

New research notes by email, plain text, with a one-click unsubscribe.

412 engineers read it. Unsubscribe any time.
NOTE WRITING · RESEARCH NOTES8 NOTES

Keep reading.

Short write-ups of things that broke and how they got fixed. Plain language, real numbers.

SCRN WORK · SCREENER6 OF 8 SHOWN

The projects behind the notes.

Filter by language, sort any column, and hover a row for the preview. Each row opens the full case study.

EOF END OF PAGE · NKESSLING↑ TOP

Type CONTACT, or just write.

hello@example.com
>

STATUS

Open to work from Nov 2026

Replies within one working day

RTM 22:23:02 · UTC 20:23

COLOPHON

Set in Geist, Geist Mono and Doto.

Charts drawn from commit data, live or demo.

No trackers, no cookies.

Create a free website with Framer, the website builder loved by startups, designers and agencies.