Re: [PATCH v3 2/3] fat: make ctime and mtime identical explicitly
From: Chung-Chiang Cheng
Date: Fri Apr 22 2022 - 04:24:29 EST
On Fri, Apr 15, 2022 at 9:28 PM OGAWA Hirofumi
<hirofumi@xxxxxxxxxxxxxxxxxx> wrote:
>
> Chung-Chiang Cheng <cccheng@xxxxxxxxxxxx> writes:
>
> > - fat_truncate_time(dir, NULL, S_ATIME|S_MTIME);
> > + fat_truncate_time(dir, NULL, S_ATIME|S_CTIME|S_MTIME);
>
> fat_truncate_time() updates i_ctime too. So S_CTIME should not be
> necessary here. And I think this is better to use only S_MTIME to tell
> this is the point of mtime update.
>
> (And, in fat_truncate_time(), I think S_CTIME is not required, because
> we ignore ctime change, isn't it?)
>
> > clear_nlink(inode);
> > - fat_truncate_time(inode, NULL, S_CTIME);
> > + fat_truncate_time(inode, NULL, S_CTIME|S_MTIME);
>
> This is the point to update ctime. You want to affect ctime change to
> mtime? As I said in previous post, I think we are better to ignore ctime
> change, because it may become yet another incompatible behavior.
>
Thanks for the feedback. I will change the behavior to ignore ctime
updates in the next version of the patch.