XFS and atime update strangeness
Felix Blyakher
felixb at sgi.com
Tue Jun 23 10:01:22 CDT 2009
On Jun 19, 2009, at 4:36 AM, Michael Weissenbacher wrote:
> Hi XFS-List!
> As i have been playing around with atime settings recently, i
> noticed that XFS handles atime updates very differently than other
> filesystems (at least different than ext2/3/4 and reiserfs). In fact
> it does not record atime changes permanently, it seems that atimes
> are only stored in the inode cache. I was testing this on a Gentoo
> Box with kernel 2.6.28-gentoo-r5 and 2.6.30 Vanilla.
>
>
> How to reproduce?
>
> invincible usr # ls -lu portage/header.txt
> -rw-r--r-- 1 root root 121 2009-06-18 22:06 portage/header.txt
> invincible usr # date
> Fri Jun 19 11:24:53 CEST 2009
> invincible usr # cat portage/header.txt > /dev/null
> invincible usr # ls -lu portage/header.txt
> -rw-r--r-- 1 root root 121 2009-06-19 11:24 portage/header.txt
> invincible usr # umount portage && mount portage
> invincible usr # ls -lu portage/header.txt
> -rw-r--r-- 1 root root 121 2009-06-18 22:06 portage/header.txt
>
> So after umount && mount the atime instantly went back to the old
> value. I can also sometimes reproduce it by doing "sync && echo 3 > /
> proc/sys/vm/drop_caches". If i wait for a day the atime also reverts
> back. Rebooting the machine has the same effect.
Right. All this says that atime is updated in the incore inode,
but never makes it to disk.
Agree, it's easily reproducible in all latest releases.
> I haven't found anything in the official documentation stating this.
That's definitely not a feature to be documented. It has to
be fixed.
> The only reference i found was a while back in the mailing list:
> http://oss.sgi.com/archives/xfs/2007-10/msg00171.html
And again a year later
http://oss.sgi.com/archives/xfs/2008-10/msg02064.html
> I think there should be at least some information about this
> behavior in the official docs and the FAQ. IMO This feature/bug
bug :)
> of XFS also collides with the recent change to make relatime the
> default in kernel 2.6.30.
If we properly sync the xfs inode to disk, whenever linux inode
is dirtied with updated atime, it will work exactly as in VFS
(whatever you see before remount), i.e. as relatime.
For this we need the patch suggested by Dave Chinner:
http://oss.sgi.com/archives/xfs/2008-10/msg02102.html
> Is there any way to enable permanent atime updates in case someone
> wants them?
That's another good request I'd like to address as well. The
above mentioned patch just makes it behave as relatime.
Thanks for bringing this up.
Felix
>
>
> Michael
>
> _______________________________________________
> xfs mailing list
> xfs at oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
More information about the xfs
mailing list