linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Sasha Levin <sashal@kernel.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	Miklos Szeredi <mszeredi@redhat.com>,
	overlayfs <linux-unionfs@vger.kernel.org>
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: <CAOQ4uxi8Ae8Pk1bUDNmQgCvEn_SoXXeW4HsNV5k2+ceejevrLQ@mail.gmail.com> (raw)
In-Reply-To: <20210910001558.173296-46-sashal@kernel.org>

On Fri, Sep 10, 2021 at 3:17 AM Sasha Levin <sashal@kernel.org> wrote:
>
> From: Amir Goldstein <amir73il@gmail.com>
>
> [ 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 <amir73il@gmail.com>
> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---

Sasha,

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
ovl_cleanup()")

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

Thanks,
Amir.

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210910001558.173296-1-sashal@kernel.org>
2021-09-10  0:15 ` 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=CAOQ4uxi8Ae8Pk1bUDNmQgCvEn_SoXXeW4HsNV5k2+ceejevrLQ@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --subject='Re: [PATCH AUTOSEL 5.14 46/99] ovl: copy up sync/noatime fileattr flags' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).