From: Nathan Cutler Date: Sun, 10 May 2015 15:13:22 +0000 (+0200) Subject: PGLog: split divergent priors as well X-Git-Tag: v0.80.11~86^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0a7f2b2a859aefebc995ad5c7b699eb117d6fa12;p=ceph.git 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. --- diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index c1563f8d914..18739f50944 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) {