[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHuHWt=xYOBhRp_KJrSF5-xDBW+x_O4gnQSsX2M5u2D8zSXwTg@mail.gmail.com>
Date: Fri, 22 Apr 2022 16:20:06 +0800
From: Chung-Chiang Cheng <shepjeng@...il.com>
To: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc: Chung-Chiang Cheng <cccheng@...ology.com>,
linux-kernel@...r.kernel.org, kernel@...heng.net
Subject: Re: [PATCH v3 3/3] fat: report creation time in statx
> > + } else {
> > fat_truncate_atime(sbi, &inode->i_mtime, &inode->i_atime);
> > + fat_truncate_crtime(sbi, &inode->i_mtime, &MSDOS_I(inode)->i_crtime);
> > + }
>
> Probably, nothing worth to update i_crtime here, right?
>
That's right. I also miss truncating the create-time for newly created
files in vfat. I will add it back in the next patch. It will be the only
location that calls fat_truncate_crtime().
@@ -781,11 +782,12 @@ static int vfat_create(struct user_namespace
*mnt_userns, struct inode *dir,
}
inode_inc_iversion(inode);
fat_truncate_time(inode, &ts, S_ATIME|S_CTIME|S_MTIME);
+ fat_truncate_crtime(...)
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?
Thanks.
Powered by blists - more mailing lists