From 0a7f2b2a859aefebc995ad5c7b699eb117d6fa12 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Sun, 10 May 2015 17:13:22 +0200 Subject: [PATCH] PGLog: split divergent priors as well Signed-off-by: Samuel Just (cherry picked from commit bbe231a61fc06a1a668e6b831fb8224526721f93) Conflicts: src/osd/PGLog.h The cherry-picked commit did not compile as-is, because the hobject_t class in firefly lacks a get_hash() method, which was added in 6de83d4. To get the patch to compile, I replaced i->second.get_hash() with i->second.hash. --- src/osd/PGLog.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index c1563f8d91431..18739f5094486 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -397,6 +397,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)<::iterator i = divergent_priors.begin(); + i != divergent_priors.end(); + ) { + if ((i->second.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) { -- 2.39.5