From: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
To: "frank.li@vivo.com" <frank.li@vivo.com>,
"glaubitz@physik.fu-berlin.de" <glaubitz@physik.fu-berlin.de>,
"slava@dubeyko.com" <slava@dubeyko.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 回复: [PATCH v2 2/3] hfs: correct superblock flags
Date: Wed, 28 May 2025 21:26:26 +0000 [thread overview]
Message-ID: <e388505b98a96763ea8b5d8197a9a2a17ec08601.camel@ibm.com> (raw)
In-Reply-To: <SEZPR06MB5269D12DE8D4F48AF96E7409E867A@SEZPR06MB5269.apcprd06.prod.outlook.com>
On Wed, 2025-05-28 at 16:37 +0000, 李扬韬 wrote:
> Hi Slava,
>
> > I am slightly confused by comment. Does it mean that the fix introduces more errors? It looks like we need to have more clear explanation of the fix here.
>
> I'll update commit msg.
>
> > s->s_flags |= SB_NODIRATIME | SB_NOATIME;
>
> IIUC, SB_NOATIME > SB_NODIRATIME.
>
Semantically, it's two different flags. One is responsible for files and another
one is responsible for folders. So, this is why I believe it's more safe to have
these both flags.
Implementation could change but setting these flags we guarantee that it needs
to take into account not to update atime for files and folders.
> So we should correct flags in smb, ceph.
>
I am not sure that it makes sense. It's more safe to have both flags set.
Thanks,
Slava.
> 2091 bool atime_needs_update(const struct path *path, struct inode *inode)
> 2092 {
> 2093 struct vfsmount *mnt = path->mnt;
> 2094 struct timespec64 now, atime;
> 2095
> 2096 if (inode->i_flags & S_NOATIME)
> 2097 return false;
> 2098
> 2099 /* Atime updates will likely cause i_uid and i_gid to be written
> 2100 ¦* back improprely if their true value is unknown to the vfs.
> 2101 ¦*/
> 2102 if (HAS_UNMAPPED_ID(mnt_idmap(mnt), inode))
> 2103 return false;
> 2104
> 2105 if (IS_NOATIME(inode))
> 2106 return false;
> 2107 if ((inode->i_sb->s_flags & SB_NODIRATIME) && S_ISDIR(inode->i_mode))
> 2108 return false;
>
> Thx,
> Yangtao
next prev parent reply other threads:[~2025-05-28 21:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 16:52 [PATCH v2 1/3] hfsplus: fix to update ctime after rename Yangtao Li
2025-05-19 16:52 ` [PATCH v2 2/3] hfs: correct superblock flags Yangtao Li
2025-05-27 22:36 ` Viacheslav Dubeyko
2025-05-28 16:37 ` 回复: " 李扬韬
2025-05-28 21:26 ` Viacheslav Dubeyko [this message]
2025-05-29 2:25 ` Yangtao Li
2025-05-30 5:21 ` Christian Brauner
2025-05-30 7:50 ` Yangtao Li
2025-05-28 16:56 ` 回复: " 李扬韬
2025-05-28 17:04 ` Viacheslav Dubeyko
2025-05-19 16:52 ` [PATCH v2 3/3] hfs: fix to update ctime after rename Yangtao Li
2025-05-27 22:46 ` Viacheslav Dubeyko
2025-05-28 1:37 ` Viacheslav Dubeyko
2025-05-28 16:50 ` 回复: " 李扬韬
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=e388505b98a96763ea8b5d8197a9a2a17ec08601.camel@ibm.com \
--to=slava.dubeyko@ibm.com \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
/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
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).