mdbx: clarify fsync/fdatasync comment.

Change-Id: I2209b5e65ca8c04ff2de9b1b789f1993f24ab454
This commit is contained in:
Leo Yuriev 2015-11-19 13:56:54 +03:00
parent 02da85169e
commit 0230e4fda2

3
mdb.c
View File

@ -4054,7 +4054,8 @@ mdb_env_sync0(MDB_env *env, unsigned flags, MDB_meta *pending)
if (unlikely(prev_mapsize != pending->mm_mapsize)) {
/* LY: It is no reason to use fdatasync() here, even in case
* no such bug in a kernel. Because "no-bug" mean that a kernel
* internally do nearly the same.
* internally do nearly the same, e.g. fdatasync() == fsync()
* when no-kernel-bug and file size was changed.
*
* So, this code is always safe and without appreciable
* performance degradation.