* munmap doesn't imply msync even with O_SYNC, right?
[not found] <904844963.2047690.1395239482118.JavaMail.zimbra@redhat.com>
@ 2014-03-19 14:42 ` Bob Peterson
0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2014-03-19 14:42 UTC (permalink / raw)
To: linux-fsdevel
Hi,
I've read the various man pages and past discussions, so I think I
already know the answer, but I just want some clarity from the experts:
If I have a program that does open / mmap / memcpy / munmap there
is no implied blocking writeback of the dirty pages at munmap, right?
Even if the file was opened O_SYNC?
In other words, if these events happen...
(1) open w/O_SYNC
(2) mmap some region
(3) memcpy to dirty some pages
(4) munmap the region
(5) someone kills the power after the munmap completes successfully
...You can still see data corruption because the dirty pages may
still have been dirty in page cache when the power went out. Correct?
The same thing applies even if the file is closed before the power
goes out, right? (All assuming no calls to msync).
Regards,
Bob Peterson
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-19 14:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <904844963.2047690.1395239482118.JavaMail.zimbra@redhat.com>
2014-03-19 14:42 ` munmap doesn't imply msync even with O_SYNC, right? Bob Peterson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).