]> git.baikalelectronics.ru Git - kernel.git/commit
fat: ignore ctime updates, and keep ctime identical to mtime in memory
authorChung-Chiang Cheng <cccheng@synology.com>
Tue, 3 May 2022 15:25:34 +0000 (23:25 +0800)
committerakpm <akpm@linux-foundation.org>
Thu, 19 May 2022 21:10:31 +0000 (14:10 -0700)
commit52133b3785549d662499bf0fd5e896219d80c1a6
tree67496eb9b879b5090d8761e84274f18ce5f067f5
parent9b8146d35a5e36c053e71692c3ee9a455a45ad20
fat: ignore ctime updates, and keep ctime identical to mtime in memory

FAT supports creation time but not change time, and there was no
corresponding timestamp for creation time in previous VFS.  The original
implementation took the compromise of saving the in-memory change time
into the on-disk creation time field, but this would lead to compatibility
issues with non-linux systems.

To address this issue, this patch changes the behavior of ctime.  It will
no longer be loaded and stored from the creation time on disk.  Instead of
that, it'll be consistent with the in-memory mtime and share the same
on-disk field.  All updates to mtime will also be applied to ctime in
memory, while all updates to ctime will be ignored.

Link: https://lkml.kernel.org/r/20220503152536.2d7b919-2-cccheng@synology.com
Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/inode.c
fs/fat/misc.c