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>
  • Loading branch information
jtlayton committed Aug 1, 2016
1 parent 988c609 commit 3248dc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/Client.cc
Expand Up @@ -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 {
Expand Down

0 comments on commit 3248dc5

Please sign in to comment.