Bug 441584 - access time for files is messed up
access time for files is messed up
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-04-08 16:19 EDT by Ed Friedman
Modified: 2008-04-11 06:32 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-11 06:32:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ed Friedman 2008-04-08 16:19:38 EDT
Description of problem:
Access time for files is messed up.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Create a file, e.g., foo.file
2.After 1 min., do a "cat foo.file", then do "ls -lt --time atime foo.file
3.This works, but then repeat step #2 after another minute has passed
Actual results:
atime does not update after subsequent cat commands

Expected results:
atime should update after each cat command

Additional info:
If after "cat foo.file" failes to update atime, do a "touch -a foo.file" and
that updates atime.  After that, the first "cat foo.file" updates atime, but
subsequent "cat foo.file" commands fail to update atime.  

This was observed on a i386 machine and on a x86_64 machine.  It was also
observed on a machine with fc7 on it, but not on machines with fc6 on it.
Comment 1 Ondrej Vasik 2008-04-09 04:45:59 EDT
Thanks for report, just tried with rawhide machine - and same result. Anyway -
problem seems to be in different place than in coreutils package itself - as it
works with rawhide package built in fc6 environment. Will try to find something
more and maybe reassign the bug afterwards.
Comment 2 Ondrej Vasik 2008-04-09 07:46:27 EDT
I'm reassigning this to kernel component, as it is quiet strange behaviour and
afaik atimes are handled by kernel. Tried with not noatime mounted file system,
so it is not noatime issue.
What we know:
1) touch foo.file; cat foo.file;ls -lu foo.file; sleep 75; cat foo.file; ls - lu
  -> both access times are the same.
2) touch -m foo.file; ls -lu foo.file
  -> access time is still the same(expected, just mtime was modified)
3) cat foo.file; ls -lu foo.file
  -> access time is changed

So access time is changed by cat only once after usage of touch/editation of
file. Feel free to reassign/close the bug if you think that this behaviour is
not caused by kernel or is not a bug.
(note: confirmed that on FC-6 is this bug not reproducable even with the rawhide
coreutils, reproducable on F7, F8 and rawhide)
Comment 3 Chuck Ebbert 2008-04-10 19:07:09 EDT
This caused by the default mount option of "relatime" in Fedora. Mount with
"norelatime" if you want normal atime updates.
Comment 4 Ondrej Vasik 2008-04-11 06:32:27 EDT
Thanks for explanation, is not very well documented feature. Closing NOTABUG. 
(some Fedora discussion partially about relatime is on

Note You need to log in before you can comment on or make changes to this bug.