Skip to content

Commit

Permalink
ceph: don't fudge the ctime in stat() unless it's really older than t…
Browse files Browse the repository at this point in the history
…he mtime

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>
(cherry picked from commit 14ee7bc)
  • Loading branch information
jtlayton authored and ldachary committed Aug 25, 2016
1 parent 66cd43b commit c0db9fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/Client.cc
Expand Up @@ -6642,7 +6642,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 {
Expand Down

0 comments on commit c0db9fb

Please sign in to comment.