Re: [PATCH v4 3/3] fat: report creation time in statx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 28, 2022 at 1:45 AM OGAWA Hirofumi
<hirofumi@xxxxxxxxxxxxxxxxxx> wrote:
> Probably, above should be the follow line?
>
>         fat_truncate_crtime(MSDOS_SB(sb), &ts, &MSDOS_I(inode)->i_crtime);
>
> And furthermore, this is missing to add it to mkdir(2)? And another one,
> we would have to update vfat_build_slots() for crtime? I'm not checking
> fully though, this seems to need isvfat test
>
>         fat_time_unix2fat(sbi, ts, &time, &date, &time_cs);
>         de->time = de->ctime = time;
>         de->date = de->cdate = de->adate = date;
>         de->ctime_cs = time_cs;

Ah, you're right. I missed vfat_mkdir() in the previous patch. After
further study, I found that maybe we can remove fat_truncate_crtime()
in both vfat_create() and vfat_mkdir(). crtime will come from only these
two cases:

(1) read from disk
(2) generated in vfat_build_slots()

They are all in {cdate:16, ctime:16, ctime_cs:8} format, which ensures
crtime will be kept at the correct granularity (10 ms). The remaining
timestamps may be copied from the vfs inode, so we need to truncate them
to fit FAT's format. But crtime doesn't need to do that.

Thanks.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux