Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Apr 2023 15:01:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 270810] munmap does not always sync the underlying file
Message-ID:  <bug-270810-227-vF2maSCOce@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-270810-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-270810-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270810

--- 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 clea=
rly
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 cohere=
nt
file system buffer cache

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-270810-227-vF2maSCOce>