+ ocfs2-relative-atime-support-tweaks.patch added to -mm tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mark Fasheh
Acked-byQuoted 5 lines · On Tue, Dec 05, 2006 at 10:12:45PM -0800, [email protected] wrote:
------------------------------------------------------
Subject: ocfs2-relative-atime-support-tweaks
From: Andrew Morton <[email protected]>methinks...
Yeah, all good tweaks - thanks for catching those. And thanks for carrying the ocfs2 patch in -mm.
Quoted 5 lines
diff -puN
fs/ocfs2/file.c~ocfs2-relative-atime-support-tweaksfs/ocfs2/file.cfs/ocfs2/file.c renamed from fs/ocfs2/file.c~ocfs2-relative-atime-support-tweaks +0
-0@@ -153,16 +153,15 @@ int ocfs2_should_update_atime(struct ino ((vfsmnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))
fs/ocfs2/file.c int ocfs2_should_update_atime(struct ino · line 159
Quoted 10 lines
fs/ocfs2/file.c renamed from fs/ocfs2/file.c~ocfs2-relative-atime-support-tweaks +2
-4return 0 ; - now =CURRENT_TIME ; -if (vfsmnt->mnt_flags &MNT_RELATIME ) { -if ((timespec_compare (&inode->i_atime, &inode->i_mtime) <0 ) || - (timespec_compare (&inode->i_atime, &inode->i_ctime) <0 )) +if ((timespec_compare (&inode->i_atime, &inode->i_mtime) <=0 ) || + (timespec_compare (&inode->i_atime, &inode->i_ctime) <=0 ))return 1 ;
Hmm, should we fix up touch_atime() to use "<=" as well? Maybe I didn't read it correctly...
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]
Quoted 8 lines · On Tue, 5 Dec 2006 22:28:09 -0800 Mark Fasheh <[email protected]> wrote:
Review
Quoted 6 lines
(quoted diff) +2
-2if (vfsmnt->mnt_flags & MNT_RELATIME) { - if ((timespec_compare(&inode->i_atime, &inode->i_mtime) < 0) || - (timespec_compare(&inode->i_atime, &inode->i_ctime) < 0)) + if ((timespec_compare(&inode->i_atime, &inode->i_mtime) <= 0) || + (timespec_compare(&inode->i_atime, &inode->i_ctime) <= 0)) return 1;Hmm, should we fix up
touch_atime()to use "<=" as well? Maybe I didn't read it correctly...
The logic I have there is the same (I hope)...
+ if (timespec_compare(&inode->i_mtime,
+ &inode->i_atime) < 0 &&
+ timespec_compare(&inode->i_ctime,
+ &inode->i_atime) < 0)
+ return;
Review
Quoted 7 lines · Andrew Morton
The logic I have there is the same (I hope)...
(quoted diff) +5
-0+ if (timespec_compare(&inode->i_mtime, + &inode->i_atime) < 0 && + timespec_compare(&inode->i_ctime, + &inode->i_atime) < 0) + return;
Oh ok, yeah I didn't notice that the arguments to timespec_compare() had been changed!
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]