Skip to content

Commit 0f7cf80

Browse files
Luis Henriquesidryomov
authored andcommitted
ceph: initialize superblock s_time_gran to 1
Having granularity set to 1us results in having inode timestamps with a accurancy different from the fuse client (i.e. atime, ctime and mtime will always end with '000'). This patch normalizes this behaviour and sets the granularity to 1. Signed-off-by: Luis Henriques <lhenriques@suse.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Sage Weil <sage@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent 1edd1fe commit 0f7cf80

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/ceph/super.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ static int ceph_set_super(struct super_block *s, void *data)
980980
s->s_d_op = &ceph_dentry_ops;
981981
s->s_export_op = &ceph_export_ops;
982982

983-
s->s_time_gran = 1000; /* 1000 ns == 1 us */
983+
s->s_time_gran = 1;
984984

985985
ret = set_anon_super(s, NULL); /* what is that second arg for? */
986986
if (ret != 0)

0 commit comments

Comments
 (0)