[Bug 270810] munmap does not always sync the underlying file

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 13 Apr 2023 15:01:04 UTC

--- Comment #4 from geoffrey@dommett.com ---
I am not suggesting that a file mapped on 2 machines is going to update in any
timely way, it would be ridiculous to suggest mmap should be a replacement for
mpi. However, when mmap is used for file IO, one obviously needs all writes to
finish. I expected munmap or program exit to perform such cleanup, but clearly
it does not unless msync is called.

The man mages of msync state:
The msync() system call is usually not needed since BSD implements a coherent
file system buffer cache

This is clearly not true any time the file is on an nfs server.  
No such call is necessary on linux either.
If you are saying this lack of cleanup when a process terminates is not a bug,
the man pages are at best misleading, and introduces a portability issue.

You are receiving this mail because:
You are the assignee for the bug.