lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200612061042.58595.dada1@cosmosbay.com>
Date:	Wed, 6 Dec 2006 10:42:58 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	Valerie Henson <val_henson@...ux.intel.com>,
	mark.fasheh@...cle.com, steve@...gwyn.com,
	linux-kernel@...r.kernel.org, ocfs2-devel@....oracle.com,
	linux-fsdevel@...r.kernel.org, viro@....linux.org.uk
Subject: Re: Relative atime (was Re: What's in ocfs2.git)

On Wednesday 06 December 2006 05:58, Andrew Morton wrote:
> > On Mon, 4 Dec 2006 16:36:20 -0800 Valerie Henson
> > <val_henson@...ux.intel.com> wrote: Add "relatime" (relative atime)
> > support.  Relative atime only updates the atime if the previous atime is
> > older than the mtime or ctime. Like noatime, but useful for applications
> > like mutt that need to know when a file has been read since it was last
> > modified.
>
> That seems like a good idea.
>
> I found touch_atime() to be rather putrid, so I hacked it around a bit. 

I find this function full of tests...

> The end result:
>
> void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
> {
> 	struct inode *inode = dentry->d_inode;
> 	struct timespec now;
>
> 	if (IS_RDONLY(inode))
> 		return;

While we are adding new tests, we could try to be smart here testing both 
MS_RDONLY and MS_NOATIME.

if (__IS_FLG(inode, MS_RDONLY | MS_NOATIME))
	return;

> 	if (inode->i_flags & S_NOATIME)
> 		return;

> 	if (inode->i_sb->s_flags & MS_NOATIME)
> 		return;
So that that one can be deleted.

>        if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
>                return;

	if (__IS_FLG(inode, MS_NODIRATIME) && S_ISDIR(inode->i_mode))
		return;

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ