fsync
A POSIX/Linux system call used to request that modified file data and required metadata be committed to persistent storage.
A successful write() does not imply that bytes have reached durable media; they may still reside in the page cache. fsync() waits for dirty file data and required metadata to be pushed through the storage stack, providing a different durability boundary after a crash.
That boundary does not automatically make the containing directory entry durable. Creating a file or publishing it with rename() may also require synchronizing the directory. This distinction is central to atomic publication in file processing.