Re: [PATCH v3 3/3] fat: report creation time in statx
From: OGAWA Hirofumi
Date: Fri Apr 22 2022 - 08:06:50 EST
Chung-Chiang Cheng <shepjeng@xxxxxxxxx> writes:
>
> I also have a question. If msdos doesn't support create-time, why does the
> original fat_truncate_time() truncate it to a 2-sec granularity?
>
> if (flags & S_CTIME) {
> if (sbi->options.isvfat)
> inode->i_ctime = fat_timespec64_trunc_10ms(*now);
> else
> inode->i_ctime = fat_timespec64_trunc_2secs(*now);
> }
>
> This logic was introduced in 6bb885ecd746 (fat: add functions to update
> and truncate timestamps appropriately"), and seems not for change-time.
> Should I remove it?
Hm, not sure.
However, ctime/atime is not stored into backing storage in
__fat_write_inode() and loaded if !isvfat (if I'm not missing
something). So I think we don't need it for creation time.
Thanks.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>