[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH2r5msAq6Kq4R0euj+y526imrsGWcXLa_LCJ9T+8G2-9PJx6A@mail.gmail.com>
Date: Fri, 30 May 2025 11:14:45 -0500
From: Steve French <smfrench@...il.com>
To: Yangtao Li <frank.li@...o.com>
Cc: pc@...guebit.com, ronniesahlberg@...il.com, sprasad@...rosoft.com,
tom@...pey.com, bharathsm@...rosoft.com, linux-cifs@...r.kernel.org,
samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] cifs: correct superblock flags
> SB_NOATIME includes SB_NODIRATIME as a subset. Therefore, setting SB_NOATIME is sufficient
Although technically the flag is not a subset, with current code in
atime_needs_update() setting SB_NODIRATIME is not needed if SB_NOATIME
is already set (see below), but it could be argued that the code is
clearer (easier to understand) to set both flags (especially as it has
no performance hit), and multiple other fs also do this. Any
additional thoughts?
if (IS_NOATIME(inode))
return false;
if ((inode->i_sb->s_flags & SB_NODIRATIME) && S_ISDIR(inode->i_mode))
return false;h
On Fri, May 30, 2025 at 3:25 AM Yangtao Li <frank.li@...o.com> wrote:
>
> SB_NOATIME includes SB_NODIRATIME as a subset. Therefore,
> setting SB_NOATIME is sufficient to disable atime updates
> for all files and directories.
>
> Signed-off-by: Yangtao Li <frank.li@...o.com>
> ---
> fs/smb/client/cifsfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c
> index a08c42363ffc..b4bc15ea33bf 100644
> --- a/fs/smb/client/cifsfs.c
> +++ b/fs/smb/client/cifsfs.c
> @@ -996,7 +996,7 @@ cifs_smb3_do_mount(struct file_system_type *fs_type,
> mnt_data.flags = flags;
>
> /* BB should we make this contingent on mount parm? */
> - flags |= SB_NODIRATIME | SB_NOATIME;
> + flags |= SB_NOATIME;
>
> sb = sget(fs_type, cifs_match_super, cifs_set_super, flags, &mnt_data);
> if (IS_ERR(sb)) {
> --
> 2.48.1
>
>
--
Thanks,
Steve
Powered by blists - more mailing lists