]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: don't fudge the ctime in stat() unless it's really older than the mtime 10386/head
authorJeff Layton <jlayton@redhat.com>
Mon, 1 Aug 2016 13:01:15 +0000 (09:01 -0400)
committerJeff Layton <jlayton@redhat.com>
Tue, 2 Aug 2016 11:20:08 +0000 (07:20 -0400)
The current code just looks at the sec field, but the difference may
only be evident in the nsec field.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc

index 93ffd07bb29c9e481cc12aa48dd1dc3fb39145bb..2df632fc0e088d66ee3b8acd32e577cc76bf54de 100644 (file)
@@ -6681,7 +6681,7 @@ int Client::fill_stat(Inode *in, struct stat *st, frag_info_t *dirstat, nest_inf
   st->st_nlink = in->nlink;
   st->st_uid = in->uid;
   st->st_gid = in->gid;
-  if (in->ctime.sec() > in->mtime.sec()) {
+  if (in->ctime > in->mtime) {
     stat_set_ctime_sec(st, in->ctime.sec());
     stat_set_ctime_nsec(st, in->ctime.nsec());
   } else {