4 ms·
Of the three options noatime, relatime and atime, I think relatime is the worst. Why? Because it is the most complex. Ordered by complexity, noatime is the easi
by bjourne 12y ago
Of the three options noatime, relatime and atime, I think relatime is the worst. Why? Because it is the most complex. Ordered by complexity, noatime is the easiest and relatime the hardest. Updating a timestamp based on an algorithm is much harder than never doing it or always doing it.
Complexity is bad, complexity even if it solves user problems is bad. The bash shellshock bug is a consequence of complexity.
If I where Linux dictator, file access time would be deprecated starting from today. POSIX be damned, but they can also do the right thing and deprecate atime in their standard. Mutt would suffer but I'm pretty sure I could write a patch for it to make it independent of files atimes. It saddens me that it seemingly "cant be done" because of legacy. Linux is full of Unix cruft in every corner (dotfiles anyone?) it needs to be cleaned up.
- tomp 12y agoAlthough you're right about it being relatively the most complex, it's absolutely a very simple algorithm. noatime: if false: update() atime: if true: update() relatime: if a > b: update() Doesn't seem very complex to me.
- bjourne 12y agoI believe the original check was if mtime was greater than or equal to atime. The current Linux implementation isn't that simple though, see: http://lwn.net/Articles/244829/ http://lwn.net/Articles/244829/. If you allow some extra complexity, it's easy to then allow some more, and then some more..
- zimpenfish 12y agoI'd like to see that patch because it sounds pretty damned tricky to me unless you're proposing to read the entire file in each time you want to check if it's been updated.