Re: [PATCH] overlayfs: set ctime when setting mtime and atime

From: Jeff Layton
Date: Wed Sep 13 2023 - 13:04:34 EST


On Wed, 2023-09-13 at 18:45 +0200, Christian Brauner wrote:
> On Wed, Sep 13, 2023 at 09:33:12AM -0400, Jeff Layton wrote:
> > Nathan reported that he was seeing the new warning in
> > setattr_copy_mgtime pop when starting podman containers. Overlayfs is
> > trying to set the atime and mtime via notify_change without also
> > setting the ctime.
> >
> > POSIX states that when the atime and mtime are updated via utimes() that
> > we must also update the ctime to the current time. The situation with
> > overlayfs copy-up is analogies, so add ATTR_CTIME to the bitmask.
> > notify_change will fill in the value.
> >
> > Reported-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
> > ---
>
> Looks good to me,
> Acked-by: Christian Brauner <brauner@xxxxxxxxxx>
>
> So we can wait for ovl to upstream this fix next and then we'll delay
> sending the ctime fixes or we'll take this fixup as well. Just let me
> know what you all prefer.

No preference here.
--
Jeff Layton <jlayton@xxxxxxxxxx>