Re: innd mmap bug in 2.4.0-test12

Linus Torvalds
2000-12-26T18:48:19Z

On Mon, 25 Dec 2000, Alan Cox wrote:
>
> > The simple fix is along the lines of adding code to fsync() that walks the
> > inode page list and writes out dirty pages.
> >
> > The clever and clean fix is to split the inode page list into two lists,
> > one for dirty and one for clean pages, and only walk the dirty list.
>
> Like the patches that were floating around on the list for the past
> few months to make O_SYNC work. Could those be used for it ?

I haven't seen the patches, but I suspect strongly that they clash with
the ext2 smart buffer sync code.

For example, the old generic_fdatasync() function already walks the list
of pages and could trivially be extended to handle dirty pages in addition
to just dirty blocks. But ext2 uses the faster and more clever "walk just
the dirty buffers of this inode" thing, which never even looks at any
pages.

This is high-level enough that the low-level filesystems should not even
see this functionality, and it doesn't look very hard to do. It's just all
these holidays in the way (and if you think you can skip christmas with a
4-year-old in the house, think AGAIN. This is a sacred time.).

Linus