fdatasync
fdatasync is a file-synchronization operation that persists modified data and the metadata required to retrieve it, without requiring synchronization of all other file metadata.
File-size changes must be synchronized because retrieval depends on them; timestamp-only changes need not be. Like a file fsync, fdatasync does not establish persistence of its containing directory entry. Check errors before acknowledging a commit.
Relations
- related
- fsync, msync, sync-file-range, writeback-error
Advantages
- Can avoid metadata work that is unnecessary for data retrieval.
Limitations
- Not a transaction across files or a substitute for directory synchronization.
- Less required metadata work does not guarantee lower latency on every filesystem.