Well, that was the approach before we had I_DIRTY_PAGES. I am
still wondering whether we can get this approach to work, with
a little more support and heuristics. PeterZ's work to better
track dirty pages should be helpful in determining when and why
a patch was dirty.
I keep thinking that by recording the time when a page was found
to be dirty and the file is mmap'd and then updating the mtime
and ctime fields in the inode during msync() and sync_single_inode()
if that time is newer than the mtime and ctime fields, then we
can solve the problem of when and when not to update those two
time fields.
I haven't had a chance to think it all through completely or do
the appropriate analysis yet though.
ps
--