Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2023 01:08:18 +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-QqkJlld8LF@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 #10 from geoffrey@dommett.com ---
what you describe is not what happens running nfsv3

running nfsv3 the syncer seems to do this as long as the process does not e=
xit
before it has finished, if it does the syncer stops, and all writes not yet
synced are permanently lost

you can't call fsync on a mapped file, mmap uses its own file handle. For
completeness, I have verified that calling fsync on the file handle makes no
difference. The writes are still lost.

surely msync with the flag MS_SYNC set should perform synchronous writes as=
 per
the man page. It seems to for local file systems and nfsv2 mounts at least.
nfsv3 it does not.

I know linux had issues like this about 15 years ago

--=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-QqkJlld8LF>