Article View: news.software.nntp
Article #59155Re: [INN] CNFS buffer pointers wrong after a crash
From: Russ Allbery
Date: Mon, 10 Jun 2002 22:16
Date: Mon, 10 Jun 2002 22:16
34 lines
2524 bytes
2524 bytes
Thomas <zak@spam.invalid> writes:
> Erik Hensema wrote:
>> Is there a way to check the constency of the buffers after a crash and
>> is there a way to find out at what position INN is _really_ writing?
> It seems INN's configure script thinks that linux does not need msync
> when using mmap.
> The man page for msync says that it is needed however.
No, the CNFS implementation is simply wrong.
The configure script is checking for something very specific, namely
whether one needs to msync in order for data written to an mmap'd region
to be visible to a read(2) of the same file. There are places in INN that
actually use that information. But CNFS is using it as a check to see
whether it should ever msync period, and of course you still do have to
msync periodically on *all* systems since the data is not guaranteed
written to disk until you do that or do munmap. The reason why you don't
need to msync before a read(2) is just due to the unified buffer cache in
most modern operating systems.
CNFS needs to occasionally unconditionally msync. I fixed this for
tradindexed in the pending rewrite; the same thing should happen for CNFS
(and that code too needs a rewrite; much of it right now is nearly
unmaintainable).
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<ylbsaivkya.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mailReferences:
<slrnaeo2u2.sqd.spamtrap@dexter.hensema.xs4all.nl> <3D04BFB6.3020005@spam.invalid>Show Full Headers
Complete Article Headers
Message-ID: <ylbsaivkya.fsf@windlord.stanford.edu> Subject: Re: [INN] CNFS buffer pointers wrong after a crash Date: Mon, 10 Jun 2002 15:16:13 -0700 From: Russ Allbery <rra@stanford.edu> References: <slrnaeo2u2.sqd.spamtrap@dexter.hensema.xs4all.nl> <3D04BFB6.3020005@spam.invalid> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 33 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1023747373 7724 171.64.13.23 (10 Jun 2002 22:16:13 GMT) X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.4 (Common Lisp, sparc-sun-solaris2.6) Cancel-Lock: sha1:zzA4ftwvhKwqJURgwlr62bpkYUI=