Re: Ext2 speedup (No atime update)

Craig Milo Rogers (rogers@isi.edu)
Wed, 05 Jun 96 19:38:37 PDT


>> [ about the "no atime update" mount option ]
>I should be able to specify the default for a filesystem as a
>mount option, then set an attribute to include/exclude directories
>as I choose. Perhaps I have one partition for the whole system,
>and I want it to be fast. I want atime to work for /var/spool/mail.
>I want to let users turn on atime for their own directories and files,
>but it should be disabled by default. I want to enable atime in /tmp,
>but then users should be able to turn it off.
>
>Looks like it needs to be a bit that can be turned on and off,
>and which is inherited from the parent directory. If chattr
>affects the mounted filesystem at a mount point, then an attribute
>alone should be good enough.

Ummm... isn't the ext2fs attribute inheritance static (at
directory and file creation time), rather than dynamic (at file open
time)? I think that to achieve the effect you want, you'll need two
attribute bits (actually, you'd want a tristate value, which would be
stored in a two-bit field). For example:

00 use mount's atime option (default)
10 explicitly update atime on this directory/file
11 explicitly don't update atime on this directory/file

Craig Milo Rogers