1 We won't change i_xtime in ldiskfs code path. But also
2 need keep normal function out of Lustre. So we using
3 S_NOCMTIME to indicate invoked from Lustre.
5 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ext4.h
6 ===================================================================
7 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/ext4.h
8 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ext4.h
9 @@ -1336,6 +1336,8 @@ static inline struct ext4_inode_info *EX
11 static inline struct timespec ext4_current_time(struct inode *inode)
13 + if (IS_NOCMTIME(inode))
14 + return inode->i_ctime;
15 return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ?
16 current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;