From 80c462596db436d0478f69ea70a9deebd0831fd3 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 24 Mar 2015 13:32:41 +1100 Subject: [PATCH] Oops, set MS_SYNC or Linux does nothing. --- samples/flushfs/flush_fs_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/flushfs/flush_fs_test.go b/samples/flushfs/flush_fs_test.go index 5a5ff14..01bff6a 100644 --- a/samples/flushfs/flush_fs_test.go +++ b/samples/flushfs/flush_fs_test.go @@ -176,13 +176,14 @@ func dup2(oldfd int, newfd int) (err error) { return } -// Call msync(2) on a slice previously returned by mmap(2). +// Call msync(2) with the MS_SYNC flag on a slice previously returned by +// mmap(2). func msync(p []byte) (err error) { _, _, errno := unix.Syscall( unix.SYS_MSYNC, uintptr(unsafe.Pointer(&p[0])), uintptr(len(p)), - 0) + unix.MS_SYNC) if errno != 0 { err = errno