Chung-Chiang Cheng <shepjeng@xxxxxxxxx> writes: > On Sun, Apr 10, 2022 at 11:43 PM OGAWA Hirofumi > <hirofumi@xxxxxxxxxxxxxxxxxx> wrote: >> >> Hm, this changes mtime includes ctime update. So, the question is, this >> behavior is compatible with Windows's fatfs behavior? E.g. Windows >> updates mtime on rename? >> >> If not same behavior with Windows, new behavior is new incompatible >> behavior, and looks break fundamental purpose of this. >> >> I was thinking, we ignores ctime update (because fatfs doesn't have) and >> always same with mtime. What behavior was actually compatible with >> Windows? >> > > If possible, to ignore ctime update may be a better choice that doesn't > affect mtime. But we need an initial value for ctime when the inode is > loaded. > > One possible option is to use mtime. Although ctime won't be updated > anymore, when mtime is changed, ctime needs to take effect. Otherwise > the next time the inode is loaded, ctime will be inconsistent. That is, > ctime is still updated indirectly by mtime. It seems impossible to avoid > updating ctime, or do we just show ctime a non-sense value? I mean I also think the behavior what you said sounds like reasonable. mtime change affect to ctime, but ctime change doesn't affect to mtime. Thanks. -- OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>