VFS: Call msync when syncing mapped data
Jeffrey Pfau jeffrey@endrift.com
Wed, 19 Oct 2016 13:52:51 -0700
2 files changed,
4 insertions(+),
0 deletions(-)
M
src/util/vfs/vfs-fd.c
→
src/util/vfs/vfs-fd.c
@@ -167,6 +167,9 @@ UNUSED(size);
struct VFileFD* vfd = (struct VFileFD*) vf; #ifndef _WIN32 futimes(vfd->fd, NULL); + if (buffer && size) { + return msync(buffer, size, MS_SYNC) == 0; + } return fsync(vfd->fd) == 0; #else HANDLE h = (HANDLE) _get_osfhandle(vfd->fd);