munmap doesn't imply msync even with O_SYNC, right?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux