Re: [PATCH] proc: update i_atime when reading files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 21, 2019 at 11:37:14AM -0500, Jeremy Cline wrote:
> Prior to commit 1da4d377f943 ("proc: revalidate misc dentries"), the
> access, modify, and change times of files in /proc were just the current
> time.

Ehh, actually no. Doing

	$(which sleep) infinity </proc/foo &

will sabotage atime updates because dentry and inode will be pinned in
caches.

"revalidate misc denries" commit simply makes the effect (much) more
visible by making objects stay in caches for longer.

> Now the mtime and ctime values change mostly as a user would
> expect, but the atime isn't updated when the file read. This patch
> updates the access time of /proc files when they are read.

>  			rv = read(file, buf, count, ppos);
> +			if (rv >= 0)
> +				inode->i_atime = current_time(inode);
> +		}

Maybe it should be done given /proc is virtual so there are no concerns
about scheduling writes noone cares about to the filesystem.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux