diff options
author | Samuel Just <sam.just@inktank.com> | 2012-11-28 17:14:11 -0800 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2012-12-06 22:53:07 -0800 |
commit | 9f169ac0f5aead0e2b3e2b33391eb45ba2f1480e (patch) | |
tree | 8252b66d9e5a52c44aedc79bd42aa750e809ed6c | |
parent | 15d899370fcc208be07726a3ccf9855189c5957d (diff) | |
download | ceph-9f169ac0f5aead0e2b3e2b33391eb45ba2f1480e.tar.gz |
OSD: account for split in project_pg_history
split causes a new interval.
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/OSD.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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<int> 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 |