Commit c277991d authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: remove unneeded in-memory i_crtime copy

i_crtime will never change after inode creation, so we don't need
to copy it into f2fs_inode_info.i_disk_time[3], and monitor its
change to decide whether updating inode page, remove related stuff.
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 68f0453d
...@@ -843,7 +843,7 @@ struct f2fs_inode_info { ...@@ -843,7 +843,7 @@ struct f2fs_inode_info {
kprojid_t i_projid; /* id for project quota */ kprojid_t i_projid; /* id for project quota */
int i_inline_xattr_size; /* inline xattr size */ int i_inline_xattr_size; /* inline xattr size */
struct timespec64 i_crtime; /* inode creation time */ struct timespec64 i_crtime; /* inode creation time */
struct timespec64 i_disk_time[4];/* inode disk times */ struct timespec64 i_disk_time[3];/* inode disk times */
/* for file compress */ /* for file compress */
atomic_t i_compr_blocks; /* # of compressed blocks */ atomic_t i_compr_blocks; /* # of compressed blocks */
...@@ -3292,9 +3292,6 @@ static inline bool f2fs_is_time_consistent(struct inode *inode) ...@@ -3292,9 +3292,6 @@ static inline bool f2fs_is_time_consistent(struct inode *inode)
return false; return false;
if (!timespec64_equal(F2FS_I(inode)->i_disk_time + 2, &inode->i_mtime)) if (!timespec64_equal(F2FS_I(inode)->i_disk_time + 2, &inode->i_mtime))
return false; return false;
if (!timespec64_equal(F2FS_I(inode)->i_disk_time + 3,
&F2FS_I(inode)->i_crtime))
return false;
return true; return true;
} }
......
...@@ -326,7 +326,6 @@ static void init_idisk_time(struct inode *inode) ...@@ -326,7 +326,6 @@ static void init_idisk_time(struct inode *inode)
fi->i_disk_time[0] = inode->i_atime; fi->i_disk_time[0] = inode->i_atime;
fi->i_disk_time[1] = inode->i_ctime; fi->i_disk_time[1] = inode->i_ctime;
fi->i_disk_time[2] = inode->i_mtime; fi->i_disk_time[2] = inode->i_mtime;
fi->i_disk_time[3] = fi->i_crtime;
} }
static int do_read_inode(struct inode *inode) static int do_read_inode(struct inode *inode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment