Messages in this thread | | | Subject | Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files | From | Miklos Szeredi <> | Date | Fri, 18 Jan 2008 20:22:32 +0100 |
| |
> > > > But then background writeout, sync(2), etc, wouldn't update the times. > > Sure it would, but only when doing the final unmap. > > Did you miss the "on unmap and msync" part?
No :)
What I'm saying is that the times could be left un-updated for a long time if program doesn't do munmap() or msync(MS_SYNC) for a long time.
If program has this pattern:
mmap() write to map msync(MS_ASYNC) sleep(long) write to map msync(MS_ASYNC) sleep(long) ...
Then we'd never see time updates (until the program exits, but that could be years).
Maybe this doesn't matter, I'm just saying this is a disadvantage compared to the "update on first dirtying" approach, which would ensure, that times are updated at least once per 30s.
Miklos
| |