The log option and data integrity

File systems are typically asynchronous in that structural changes to the file system are not immediately written to disk, which provides better performance. However, recent changes made to a system can be lost if a system failure occurs. Specifically, attribute changes to files and recently created files may disappear.

The mount -o log intent logging option guarantees that all structural changes to the file system are logged to disk before the system call returns to the application. With this option, the rename(2) system call flushes the source file to disk to guarantee the persistence of the file data before renaming it. The rename() call is also guaranteed to be persistent when the system call returns. The changes to file system data and metadata caused by the fsync(2) and fdatasync(2) system calls are guaranteed to be persistent once the calls return.