]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: make sure mds_stamp is set when we journal
authorSage Weil <sage@inktank.com>
Tue, 20 May 2014 21:52:59 +0000 (14:52 -0700)
committerSage Weil <sage@inktank.com>
Tue, 20 May 2014 21:52:59 +0000 (14:52 -0700)
This is a catch-all that we are carrying over from before.  It may not
be strictly necessary, but I'm not inclined to check the code for
Mutation users who didn't call acquire_locks().

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

index 4c9a1e530e92deac1be17c12bb34caad03be9ff8..e33b0109cf2724d530a71ecc4a3668086c4a9707 100644 (file)
@@ -1857,9 +1857,9 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
 
   assert(mds->mdlog->entry_is_open());
 
-  // declare now?
-  if (mut->now == utime_t())
-    mut->now = ceph_clock_now(g_ceph_context);
+  // make sure stamp is set
+  if (mut->get_mds_stamp() == utime_t())
+    mut->set_mds_stamp(ceph_clock_now(g_ceph_context));
 
   if (in->is_base())
     return;