Re: mmap-related questions

Kenny Simpson
2003-04-01T03:14:26Z

--- Benjamin LaHaise <bcrl@redhat.com> wrote:
> No. You must use msync().

> Note that fsync() after
> munmap() will flush the
> pages to disk under Linux.
Sweet! Paydirt! Is this documented/guaranteed to
continue to work for a while?
Is this true for all non-mmap()ed dirty buffers for a
given file?

Just to restate what you said:
- if part of a file is mmap()ed, msync() MUST be used
to sync it.
- any non-mmap()ed portions are synched with fsync().

I'm assuming this is a per-process thing. i.e. The
above is true regardless of what other processes are
doing (e.g. even if another process has the same file
mmap()'d, I don't care).

> 2.4.7 is way out of date and should be updated for
> the numerous bugfixes and
> security errata.
I know. Unfortunately not my call. Desperately
trying to beat people with clue sticks....

Thanks!,
-Kenny

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more