]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do rstat timestamps (rctime, fragstat mtime) in terms of op stamp
authorSage Weil <sage@inktank.com>
Tue, 20 May 2014 21:55:05 +0000 (14:55 -0700)
committerSage Weil <sage@inktank.com>
Tue, 20 May 2014 21:55:05 +0000 (14:55 -0700)
Use the op (client) timestamp for the recursive stats, for santity's sake.
Note that since this is monotonically increasing, the danger here is
that we lose track of nested changes due to skewed client clocks.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mds/MDCache.cc

index e33b0109cf2724d530a71ecc4a3668086c4a9707..d470a6b441a996f26d88f07d8ab2584a73e1f8eb 100644 (file)
@@ -1910,10 +1910,10 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
       parent->resync_accounted_fragstat();
 
       if (do_parent_mtime) {
-       pf->fragstat.mtime = mut->now;
-       if (mut->now > pf->rstat.rctime) {
+       pf->fragstat.mtime = mut->get_op_stamp();
+       if (pf->fragstat.mtime > pf->rstat.rctime) {
          dout(10) << "predirty_journal_parents updating mtime on " << *parent << dendl;
-         pf->rstat.rctime = mut->now;
+         pf->rstat.rctime = pf->fragstat.mtime;
        } else {
          dout(10) << "predirty_journal_parents updating mtime UNDERWATER on " << *parent << dendl;
        }