Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mappedfiles

From: Miklos Szeredi
Date: Fri Jan 18 2008 - 13:51:59 EST


> > > And even in that four-liner, I suspect that the *last* two lines are
> > > actually incorrect: there's no point in updating the file time when the
> > > page *becomes* dirty,
> >
> > Actually all four lines do that. The first two for a write access on
> > a present, read-only pte, the other two for a write on a non-present
> > pte.
> >
> > > we should update the file time when it is marked
> > > clean, and "msync(MS_SYNC)" should update it as part of *that*.
> >
> > That would need a new page flag (PG_mmap_dirty?). Do we have one
> > available?
>
> I thought the page writing stuff looked at (and cleared) the pte
> dirty bit, too?

Yeah, it does. Hmm...

What happens on munmap? The times _could_ get updated from there as
well, but it's getting complicated.

Miklos

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/