All of lore.kernel.org
 help / color / mirror / Atom feed
* XFS and atime update strangeness
@ 2009-06-19  9:36 Michael Weissenbacher
  2009-06-23 15:01 ` Felix Blyakher
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Weissenbacher @ 2009-06-19  9:36 UTC (permalink / raw)
  To: xfs

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.

I haven't found anything in the official documentation stating this. The only reference i found was a while back in the mailing list:
http://oss.sgi.com/archives/xfs/2007-10/msg00171.html

I think there should be at least some information about this behavior in the official docs and the FAQ. IMO This feature/bug of XFS also collides with the recent change to make relatime the default in kernel 2.6.30. Is there any way to enable permanent atime updates in case someone wants them?

Michael

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: XFS and atime update strangeness
  2009-06-19  9:36 XFS and atime update strangeness Michael Weissenbacher
@ 2009-06-23 15:01 ` Felix Blyakher
  2009-06-23 16:35   ` Matthias Schniedermeyer
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Blyakher @ 2009-06-23 15:01 UTC (permalink / raw)
  To: Michael Weissenbacher; +Cc: xfs

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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: XFS and atime update strangeness
  2009-06-23 15:01 ` Felix Blyakher
@ 2009-06-23 16:35   ` Matthias Schniedermeyer
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Schniedermeyer @ 2009-06-23 16:35 UTC (permalink / raw)
  To: Felix Blyakher; +Cc: Michael Weissenbacher, xfs

On 23.06.2009 10:01, Felix Blyakher wrote:
> On Jun 19, 2009, at 4:36 AM, Michael Weissenbacher wrote:
>
>> 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.

Just to have it explictly mentioned a.k.a. just for the record.

strictatime is AWOL.

With current 2.6.30 you just can't have 'atime' because default was 
changed to 'relatime' and the former default got the new option 
'strictatime'(*). But if i want to mount a XFS-filesystem strictatime: 
XFS: unknown mount option [strictatime]


*:                
According to fs/namespace.c, line 795 and following these 4 
atime-related options appear to be allowed:

{ MNT_NOATIME, ",noatime" },
{ MNT_NODIRATIME, ",nodiratime" },
{ MNT_RELATIME, ",relatime" },
{ MNT_STRICTATIME, ",strictatime" },




Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-23 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-19  9:36 XFS and atime update strangeness Michael Weissenbacher
2009-06-23 15:01 ` Felix Blyakher
2009-06-23 16:35   ` Matthias Schniedermeyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.