> I really makes no sense at all to
> have munmap(2) not imply msync(3C).
Why not? munmap(2) does basically the equivalent of write(2). In the
case of write, that is: a later read from the same location will see
the written data, unless another write happens in-between. If power
goes down following the write, all bets are off. And translated to
munmap: a subsequent call to mmap(2) that makes the previously
munmap-ped region available will make visible everything stored to the
region prior to the munmap call. If power goes down following the
munmap, all bets are off. In both cases, if you want your data to
persist across power losses, use sync -- fsync or msync.
If only the syncing variants were available, disk accesses would be
significantly slower, and disks would thrash rather audibly all the
zfs-discuss mailing list