mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ceph: correct superblock flags
@ 2025-05-30  8:44 Yangtao Li
  2025-05-30 16:17 ` Viacheslav Dubeyko
  0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2025-05-30  8:44 UTC (permalink / raw)
  To: xiubli, idryomov; +Cc: ceph-devel, linux-kernel, Yangtao Li

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@vivo.com>
---
 fs/ceph/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index f3951253e393..7c9e4987adf4 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -1226,7 +1226,7 @@ static int ceph_set_super(struct super_block *s, struct fs_context *fc)
 	s->s_time_gran = 1;
 	s->s_time_min = 0;
 	s->s_time_max = U32_MAX;
-	s->s_flags |= SB_NODIRATIME | SB_NOATIME;
+	s->s_flags |= SB_NOATIME;
 
 	ceph_fscrypt_set_ops(s);
 
-- 
2.48.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re:  [PATCH] ceph: correct superblock flags
  2025-05-30  8:44 [PATCH] ceph: correct superblock flags Yangtao Li
@ 2025-05-30 16:17 ` Viacheslav Dubeyko
  0 siblings, 0 replies; 2+ messages in thread
From: Viacheslav Dubeyko @ 2025-05-30 16:17 UTC (permalink / raw)
  To: frank.li, Xiubo Li, idryomov; +Cc: ceph-devel, linux-kernel

On Fri, 2025-05-30 at 02:44 -0600, Yangtao Li 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@vivo.com>
> ---
>  fs/ceph/super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/super.c b/fs/ceph/super.c
> index f3951253e393..7c9e4987adf4 100644
> --- a/fs/ceph/super.c
> +++ b/fs/ceph/super.c
> @@ -1226,7 +1226,7 @@ static int ceph_set_super(struct super_block *s, struct fs_context *fc)
>  	s->s_time_gran = 1;
>  	s->s_time_min = 0;
>  	s->s_time_max = U32_MAX;
> -	s->s_flags |= SB_NODIRATIME | SB_NOATIME;
> +	s->s_flags |= SB_NOATIME;
>  
>  	ceph_fscrypt_set_ops(s);
> 

This modification doesn't make sense to me. And I prefer to be more conservative
here. Moreover, from my point of view, SB_NODIRATIME flag is associated with
nodiratime mount option and SB_NOATIME is associated with noatime mount option.
By setting these flags, we instruct how file system needs to behave for the case
of nodiratime and noatime mounts. So, semantically, this modification sounds
wrong to me. I don't think that we need to accept this modification, otherwise,
something could be broken.

Thanks,
Slava.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-30 16:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-30  8:44 [PATCH] ceph: correct superblock flags Yangtao Li
2025-05-30 16:17 ` Viacheslav Dubeyko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®