]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ceph: initialize superblock s_time_gran to 1
authorLuis Henriques <lhenriques@suse.com>
Thu, 27 Jun 2019 13:51:22 +0000 (14:51 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 8 Jul 2019 12:01:45 +0000 (14:01 +0200)
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>
fs/ceph/super.c

index 542b31994e3be62a57ff1b1436187442bc048257..c21201a951cedf49f56c25ada6104166cb50b6cb 100644 (file)
@@ -980,7 +980,7 @@ static int ceph_set_super(struct super_block *s, void *data)
        s->s_d_op = &ceph_dentry_ops;
        s->s_export_op = &ceph_export_ops;
 
-       s->s_time_gran = 1000;  /* 1000 ns == 1 us */
+       s->s_time_gran = 1;
 
        ret = set_anon_super(s, NULL);  /* what is that second arg for? */
        if (ret != 0)