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/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270810

--- 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 exit
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

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

help

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