File-system transaction durability (source code)

= File-system transaction durability

An acknowledged <file-system transaction> remains recoverable after a crash under the stated storage assumptions. In the full-data timeline, durable <journal payload> and a durable <journal commit record> suffice even before the <journal checkpoint>. A crash before durable commit can lose the append while still preserving <file-system crash consistency>. A successful ordinary write may only have reached a <buffer cache>; an application requiring persistence must use its documented interface and check errors. On <Linux kernel>-based systems, <fsync> on a <file descriptor> persists the associated <file> contents and <file metadata>, but persisting a newly created name also requires <fsync> on the containing <file-system directory>.<fsync(2) — Linux manual page by Linux man-pages project>{ref}