]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: track latest epoch in op_target_t
authorSage Weil <sage@redhat.com>
Mon, 20 Feb 2017 18:19:39 +0000 (13:19 -0500)
committerSage Weil <sage@redhat.com>
Thu, 23 Feb 2017 15:29:42 +0000 (10:29 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc
src/osdc/Objecter.h

index d83bcf17b50a330b81d20439ba8515e7702ccf4f..87dd5aa6fab11317cf91e05b75efda414e214dca 100644 (file)
@@ -2661,7 +2661,9 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change)
   // rwlock is locked
   bool is_read = t->flags & CEPH_OSD_FLAG_READ;
   bool is_write = t->flags & CEPH_OSD_FLAG_WRITE;
-  ldout(cct,20) << __func__ << " base " << t->base_oid << " " << t->base_oloc
+  t->epoch = osdmap->get_epoch();
+  ldout(cct,20) << __func__ << " epoch " << t->epoch
+               << " base " << t->base_oid << " " << t->base_oloc
                << " precalc_pgid " << (int)t->precalc_pgid
                << " pgid " << t->base_pgid
                << (is_read ? " is_read" : "")
index fc8dce0304cdc9a0e6a67812fba9d33d9bffb8be..bea8d136abe11f2f2608d87bebdf1011f0f55d29 100644 (file)
@@ -1182,6 +1182,9 @@ public:
 
   struct op_target_t {
     int flags = 0;
+
+    epoch_t epoch = 0;  ///< latest epoch we calculated the mapping
+
     object_t base_oid;
     object_locator_t base_oloc;
     object_t target_oid;