From: Sage Weil Date: Tue, 20 May 2014 21:55:05 +0000 (-0700) Subject: mds: do rstat timestamps (rctime, fragstat mtime) in terms of op stamp X-Git-Tag: v0.82~57^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd1f9bdadafca0a1d158110ce2947dd032573932;p=ceph.git mds: do rstat timestamps (rctime, fragstat mtime) in terms of op stamp 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 --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e33b0109cf272..d470a6b441a99 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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; }