]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog: split divergent priors as well 3994/head
authorSamuel Just <sjust@redhat.com>
Mon, 9 Mar 2015 15:25:27 +0000 (08:25 -0700)
committerSamuel Just <sjust@redhat.com>
Mon, 16 Mar 2015 21:34:03 +0000 (14:34 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PGLog.h

index 7d18f77c68c0fc02136b7e83187a8867ccdc7279..ffffe099c9ef5e582018d8f2b002da8de67cdafe 100644 (file)
@@ -497,6 +497,19 @@ public:
     missing.split_into(child_pgid, split_bits, &(opg_log->missing));
     opg_log->mark_dirty_to(eversion_t::max());
     mark_dirty_to(eversion_t::max());
+
+    unsigned mask = ~((~0)<<split_bits);
+    for (map<eversion_t, hobject_t>::iterator i = divergent_priors.begin();
+        i != divergent_priors.end();
+        ) {
+      if ((i->second.get_hash() & mask) == child_pgid.m_seed) {
+       opg_log->add_divergent_prior(i->first, i->second);
+       divergent_priors.erase(i++);
+       dirty_divergent_priors = true;
+      } else {
+       ++i;
+      }
+    }
   }
 
   void recover_got(hobject_t oid, eversion_t v, pg_info_t &info) {