Commit f7a2d068 authored by Xiubo Li's avatar Xiubo Li Committed by Ilya Dryomov

ceph: disable updating the atime since cephfs won't maintain it

Since CephFS makes no attempt to maintain atime, we shouldn't
try to update it in mmap and generic read cases and ignore updating
it in direct and sync read cases.

And even we update it in mmap and generic read cases we will drop
it and won't sync it to MDS. And we are seeing the atime will be
updated and then dropped to the floor again and again.

URL: https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/thread/VSJM7T4CS5TDRFF6XFPIYMHP75K73PZ6/Signed-off-by: default avatarXiubo Li <xiubli@redhat.com>
Acked-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 1b2ba3c5
...@@ -1777,7 +1777,6 @@ int ceph_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -1777,7 +1777,6 @@ int ceph_mmap(struct file *file, struct vm_area_struct *vma)
if (!mapping->a_ops->readpage) if (!mapping->a_ops->readpage)
return -ENOEXEC; return -ENOEXEC;
file_accessed(file);
vma->vm_ops = &ceph_vmops; vma->vm_ops = &ceph_vmops;
return 0; return 0;
} }
......
...@@ -1119,6 +1119,7 @@ static int ceph_set_super(struct super_block *s, struct fs_context *fc) ...@@ -1119,6 +1119,7 @@ static int ceph_set_super(struct super_block *s, struct fs_context *fc)
s->s_time_gran = 1; s->s_time_gran = 1;
s->s_time_min = 0; s->s_time_min = 0;
s->s_time_max = U32_MAX; s->s_time_max = U32_MAX;
s->s_flags |= SB_NODIRATIME | SB_NOATIME;
ret = set_anon_super_fc(s, fc); ret = set_anon_super_fc(s, fc);
if (ret != 0) if (ret != 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment