why msync() is not quoted by MMAP_NEED_MSYNC?
Russ Allbery
rra at stanford.edu
Fri Jan 2 21:25:19 UTC 2004
Katsuhiro Kondou <Katsuhiro_Kondou at isc.org> writes:
> While I installed latest cvs version on my iBook, I found innd dies when
> msync() is called at innd/icd.c. msync() returns EINVAL, but from
> msync(2), I don't think innd misuses msync(). I'm suspecting potential
> bug in msync() on OSX, and have already reported to Apple. OTTH, I
> think msync() is not required for innd on OSX, since the result of
> configure indicates;
> checking whether msync is needed... no
> I think we can quote '#ifdef MMAP_NEED_MSYNC' where msync() is used.
> Any thoughts?
You always want to msync periodically on all platforms or you lose all
your data in a crash. MMAP_NEED_MSYNC only determines whether you need to
msync after every non-mmap write in order to see the results.
msync needs to be called with page-aligned addresses. Some parts of INN
weren't doing that; I don't know if icd.c has that problem. If so, the
msync_page function may help.
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers
mailing list