[PATCH] erofs-utils: mkfs: Use mtime to seed ctimes

Gao Xiang hsiangkao at linux.alibaba.com
Tue Mar 1 17:09:36 AEDT 2022


On Mon, Feb 28, 2022 at 10:02:02PM -0800, David Anderson wrote:
> On Mon, Feb 28, 2022 at 9:27 PM Gao Xiang <hsiangkao at linux.alibaba.com> wrote:
> >
> > Yeah, I agree I should think more when I planned to store `ctime' at the
> > first time [my original thought was to keep metadata time (including
> > uid, gid, etc..), so I selected `ctime' instead of `mtime'].
> >
> > Should we change what's described in 'Documentation/filesystems/erofs.rst'
> > and even rename i_ctime to i_mtime?
> 
> That's a good idea, I'll repost with a patch to rename to mtime.
> Initially I figured it was ok, but the "ctime" name would cause
> problems if EROFS ever stores both timestamps.

Yeah, I recommend that we could use mtime from now on, but in case that
users are confused, we may need add a compatible feature to indicate that.

> 
> > Also should we introduce a new compat feature to indicate that new mkfs
> > records mtime instead?
> 
> Will do. Is there anything in the kernel that would need to care about
> the new flag? (It looks like no but asking just in case.)

No I think, old kernels are still compatible with a new compatible
feature. It's just for marking.

Thanks,
Gao Xiang

> 
> Best,
> 
> -David


More information about the Linux-erofs mailing list