Skip to content

Commit f7a2d06

Browse files
lxbszidryomov
authored andcommitted
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/[email protected]/thread/VSJM7T4CS5TDRFF6XFPIYMHP75K73PZ6/ Signed-off-by: Xiubo Li <[email protected]> Acked-by: Ilya Dryomov <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 1b2ba3c commit f7a2d06

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

fs/ceph/addr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,6 @@ int ceph_mmap(struct file *file, struct vm_area_struct *vma)
17771777

17781778
if (!mapping->a_ops->readpage)
17791779
return -ENOEXEC;
1780-
file_accessed(file);
17811780
vma->vm_ops = &ceph_vmops;
17821781
return 0;
17831782
}

fs/ceph/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,7 @@ static int ceph_set_super(struct super_block *s, struct fs_context *fc)
11191119
s->s_time_gran = 1;
11201120
s->s_time_min = 0;
11211121
s->s_time_max = U32_MAX;
1122+
s->s_flags |= SB_NODIRATIME | SB_NOATIME;
11221123

11231124
ret = set_anon_super_fc(s, fc);
11241125
if (ret != 0)

0 commit comments

Comments
 (0)