Re: innd mmap bug in 2.4.0-test12

Daniel Phillips
2000-12-28T16:37:08Z

Rik van Riel wrote:
>
> On Thu, 28 Dec 2000, Rik van Riel wrote:
> > On Wed, 27 Dec 2000, Linus Torvalds wrote:
> > > On Wed, 27 Dec 2000, Rik van Riel wrote:
> > > >
> > > > The (trivial) patch below should fix this problem.
> > >
> > > It must be wrong.
> > >
> > > If we have a dirty page on the LRU lists, that page _must_ have
> > > a mapping.
> >
> > Hmm, last I looked buffercache pages didn't have
> > page->mapping set ...
>
> OK, you're right ;)
>
> We never set PG_dirty for buffercache pages, so a
> pure buffercache page shouldn't be caught here...

But we should, and something that does it is buried in Chris Mason's
patch under the thread [RFC] changes to buffer.c. Chris is also trying
some other fancy things in that patch, but the buffer cache mapping part
is actually pretty simple.

For buffer cache pages I think the current thinking is that PG_dirty
should stay on until the last dirty buffer on the page has been
submitted for writing.

--
Daniel