Bug 111891 - access to file does not change access time to folders above up to /(root)
Summary: access to file does not change access time to folders above up to /(root)
Status: CLOSED INVALID
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-04 14:42 UTC by Armin Mohring
Modified: 2016-02-07 09:59 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.1.15
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Armin Mohring 2016-02-04 14:42:42 UTC
Ext4 with relatime mount option.

Access to file e.g.: /home/armin/documents/abc (file)
does lead into the following:

The access time of the /home directory is not changed, but should be.
Comment 1 Andreas Dilger 2016-02-05 02:38:19 UTC
I'm not sure where you got the idea that the access time of all parent directories should be changed, but that isn't how POSIX works. Only the access time of the file will be modified, otherwise there would be a huge amount of overhead (e.g. maybe dozens of disk writes) for every file access.

Also, most filesystems have no way of determining the parent directories for a given file, and there may be multiple parent directories for a single file (hard links), and it wouldn't make sense to update all of those directories, so this is also impractical to implement for most filesystems.

People have enough problems with atime without making it even more expensive, and relatime is already reducing the number of cases where atime is updated significantly.

Seems I cannot close this bug (Ted, can you give me permission for this?), but it should be closed as "not a bug".
Comment 2 Armin Mohring 2016-02-05 02:58:24 UTC
I thought it would be a good idea to change this behaviour.
Comment 3 Armin Mohring 2016-02-05 08:31:20 UTC
I think, only symbolic links should be used.

The parent directory is given by the directory tree itself. Stored in a tree.
Comment 4 Theodore Tso 2016-02-05 20:36:29 UTC
Andreas, I don't have access to change the access controls.  We need to ask the bugzilla.kernel.org admins to add you to the appropriate ACL.
Comment 5 Armin Mohring 2016-02-05 20:39:43 UTC
The additional write amount is not so big as expected.
Comment 6 Armin Mohring 2016-02-07 09:59:54 UTC
Just backtrace the directory tree.
Modern firesystems use trees for storing the directory information.

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