From 9f169ac0f5aead0e2b3e2b33391eb45ba2f1480e Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 28 Nov 2012 17:14:11 -0800 Subject: [PATCH] OSD: account for split in project_pg_history split causes a new interval. Signed-off-by: Samuel Just --- src/osd/OSD.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index a4b3179dc3e..b4df253120f 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1796,6 +1796,7 @@ void OSD::project_pg_history(pg_t pgid, pg_history_t& h, epoch_t from, e--) { // verify during intermediate epoch (e-1) OSDMapRef oldmap = get_map(e-1); + assert(oldmap->have_pg_pool(pgid.pool())); vector up, acting; oldmap->pg_to_up_acting_osds(pgid, up, acting); @@ -1808,6 +1809,12 @@ void OSD::project_pg_history(pg_t pgid, pg_history_t& h, epoch_t from, << dendl; h.same_interval_since = e; } + // split? + if (pgid.is_split(oldmap->get_pg_num(pgid.pool()), + osdmap->get_pg_num(pgid.pool()), + 0)) { + h.same_interval_since = e; + } // up set change? if (up != currentup && e > h.same_up_since) { dout(15) << "project_pg_history " << pgid << " up changed in " << e