Catching up with old mail...
On 20/10/14 12:44, Howard Chu wrote:
This paper https://www.usenix.org/conference/osdi14/technical-sessions/presentation/zhe... describes a potential crash vulnerability in LMDB due to its use of fdatasync instead of fsync when syncing writes to the data file. The vulnerability exists because fdatasync omits syncs of the file metadata; if the data file needed to grow as a result of any writes then this requires a metadata update.
Looks like an OS bug. fdatasync() should not break data integrity, it may only skip metadata which are unneeded for retrieving the data. So size changes are synced. So say the Posix spec and the Linux manpage.