valis / Reference / API reference
Durable file - API reference
Exported surface for the durable-file subsystem. Part of the API reference.
Package valis/src/durable-file
Conditions
durable-write-directory-unsynced
Signalled as a warning when a durable write has renamed its new file into place but the directory sync after it fails. The change is on disk; only its survival of a crash is in doubt.
Generic functions
durable-write-directory-unsynced-cause
(durable-write-directory-unsynced-cause condition)
Undocumented: this exported symbol needs a docstring.
durable-write-directory-unsynced-path
(durable-write-directory-unsynced-path condition)
Undocumented: this exported symbol needs a docstring.
Functions
fsync-directory-of
(fsync-directory-of path)
Flush the directory holding PATH to stable storage, so an entry renamed or created in it survives a crash.
write-file-0600
(write-file-0600 path octets &key (unsynced-warning (quote durable-write-directory-unsynced)))
Replace PATH with OCTETS durably: write a sibling file of its own, created exclusively at mode 0600, flush it to stable storage, rename it over PATH, and sync the directory so the new entry survives a crash. The sibling is removed when the write fails before the rename. Once the rename has happened the change is on disk, so a failed directory sync is signalled as a warning of class UNSYNCED-WARNING, given :path and :cause, and the write still succeeds. A store passes its own warning class so its callers keep the condition they already handle.