archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <>
To: Sasha Levin <>
Cc: linux-kernel <>,
	stable <>,
	Miklos Szeredi <>,
	overlayfs <>
Subject: Re: [PATCH AUTOSEL 5.14 46/99] ovl: copy up sync/noatime fileattr flags
Date: Fri, 10 Sep 2021 08:35:41 +0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Sep 10, 2021 at 3:17 AM Sasha Levin <> wrote:
> From: Amir Goldstein <>
> [ Upstream commit 72db82115d2bdfbfba8b15a92d91872cfe1b40c6 ]
> When a lower file has sync/noatime fileattr flags, the behavior of
> overlayfs post copy up is inconsistent.
> Immediately after copy up, ovl inode still has the S_SYNC/S_NOATIME
> inode flags copied from lower inode, so vfs code still treats the ovl
> inode as sync/noatime.  After ovl inode evict or mount cycle,
> the ovl inode does not have these inode flags anymore.
> To fix this inconsistency, try to copy the fileattr flags on copy up
> if the upper fs supports the fileattr_set() method.
> This gives consistent behavior post copy up regardless of inode eviction
> from cache.
> We cannot copy up the immutable/append-only inode flags in a similar
> manner, because immutable/append-only inodes cannot be linked and because
> overlayfs will not be able to set overlay.* xattr on the upper inodes.
> Those flags will be addressed by a followup patch.
> Signed-off-by: Amir Goldstein <>
> Signed-off-by: Miklos Szeredi <>
> Signed-off-by: Sasha Levin <>
> ---


I do not recommend applying this patch to stable.
The value/risk ratio is not worth it IMO.

I don't know of anyone who ever complained about not copying
the NOATIME/SYNC fileattrs specifically.

This patch is more of a complimentary patch to the IMMUTABLE/
APPEND fileattr patch, which is not appropriate for stable either.

OTOH, ovl-update-5.15 has this patch that was not included in the
AUTOSEL batch, even though it has a Fixes tag, CC stable and
very strong hints in the subject:
52d5a0c6bd8a ("ovl: fix BUG_ON() in may_delete() when called from

I suppose AUTOSEL leaves these sorts of patches to Greg's scripts?


  reply	other threads:[~2021-09-10  5:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2021-09-10  0:15 ` [PATCH AUTOSEL 5.14 46/99] ovl: copy up sync/noatime fileattr flags Sasha Levin
2021-09-10  5:35   ` Amir Goldstein [this message]
2021-09-11 14:36     ` Sasha Levin
2021-09-10  0:15 ` [PATCH AUTOSEL 5.14 47/99] ovl: skip checking lower file's i_writecount on truncate Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).