]> git.proxmox.com Git - mirror_zfs.git/commit
Fix atime handling.
authorTim Chase <tim@chase2k.com>
Tue, 10 Dec 2013 22:36:42 +0000 (16:36 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 12 Dec 2013 18:23:58 +0000 (10:23 -0800)
commit84b0aac5fdab6daf8c4179dfba4abeb47e0d8b8e
treeccc6847d52119bddc85c6ebe7fd3156c0de4fd27
parent5cb65efe2c3d4aaa77a5881be364c443c859bbc8
Fix atime handling.

Previously, the atime-modifying vnops called ZFS_ACCESSTIME_STAMP()
followed by zfs_inode_update() to update the atime.  However, since atimes
are cached in the znode for delayed writing, the zfs_inode_update()
function would effectively ignore the cached atime by reading it from
the SA.

This commit moves the updating of the atime in the inode into
zfs_tstamp_update_setup() which is called by the ZFS_ACCESSTIME_STAMP()
macro and eliminates the call to zfs_inode_update() in the atime-modifying
vnops.

It's possible the same thing could have been done directly in
zfs_inode_update() but I wasn't sure that it was safe in all cases where
it is called.

The effect is that atime handling is as if "strictatime" were selected;
even if the filesystem is mounted with "relatime".

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1949
module/zfs/zfs_vnops.c
module/zfs/zfs_znode.c