_IO_file_underflow_mmap read call for atime

Roland McGrath roland@frob.com
Wed Jul 31 16:10:00 GMT 2002


> The Linux code modifies atime when it's mapped.

And it doesn't update atime on read faults as well?  That is permissible
behavior, but not very helpful.  It makes atime pretty useless if it's
possible there are mmap readers.  There could be a process that opened the
file and mmap'd it a year ago, and then later something does a write so
mtime > atime; then if the first process reads the new data, atime remains
unchanged and sometime contemplating mtime vs atime would conclude that the
new data has not been read by anyone.



More information about the Libc-hacker mailing list