Skip to content

fs: fixes for multigrain ctime code

Jeff Layton linux-fsdevel linux-mm lkml 1 version Applied

Status from this message: Applied to the vfs.ctime branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected] change-id 20230907-ctime-fixes-ec6319ca01be

Versions newest first

  1. v1 Latest2 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2fs: initialize inode->__i_ctime to the epochfs/inode.c+2 -03 replies
2/2fs: don't update the atime if existing atime is newer than "now"fs/inode.c+2 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] fs: fixes for multigrain ctime code

The kernel test robot noted some test failures with the LTP mount03 test on tmpfs. From the test output, it looked like the atime had gone backward.

One way this could happen would be for tmpfs to get a new inode from the slab that had a ctime that appeared to be in the future. inode_update_ctime_current would just return that time and then the mtime and atime would be set to the same value. Then later, the atime gets overwritten by "now" which is still lower than the garbage ctime value.

I've not been able to reproduce this on my test rig, so I'm not certain this fixes the problem that was reported. I'm hopeful though, so I've left the KTR tags in place.

---
Jeff Layton (2):
fs: initialize inode->__i_ctime to the epoch
fs: don't update the atime if existing atime is newer than "now"

 fs/inode.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

---
base-commit: 7ba2090ca64ea1aa435744884124387db1fac70f
change-id: 20230907-ctime-fixes-ec6319ca01be

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>