ceph: correct superblock flags
PATCH 1/1 ceph: correct superblock flags
SB_NOATIME includes SB_NODIRATIME as a subset. Therefore, setting SB_NOATIME is sufficient to disable atime updates for all files and directories.
--- fs/ceph/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/super.c +1 -1
@@ -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);
Signature · 1 line
2.48.1
Quoted 14 lines · Yangtao Li
SB_NOATIMEincludesSB_NODIRATIMEas a subset. Therefore, settingSB_NOATIMEis sufficient to disable atime updates for all files and directories.Signed-off-by Yangtao Li <[email protected]>--- fs/ceph/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ceph/super.c +0
-0
fs/ceph/super.c static int ceph_set_super(struct super_block *s, struct fs_context *fc) · line 1232
Quoted 8 lines
fs/ceph/super.c +1
-1@@ -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.