From 8ee93d5f661b303cafcb0134a0e9a1fce7b8e6b2 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 27 Aug 2015 11:08:33 -0700 Subject: [PATCH] PG::handle_advance_map: on_pool_change after handling the map change Otherwise, the is_active() checks in the hitset code can erroneously return true firing off repops stamped with the new epoch which then get cleared in the map change code. The filestore callbacks then pass the interval check and call into a destroyed repop structure. Fixes: 12809 Backport: hammer,firefly Signed-off-by: Samuel Just (cherry picked from commit 14e02bc90a463805f4c3e2de210892067a52514b) --- src/osd/PG.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index acafb4f3d86..77c0d6bf2ff 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5272,12 +5272,12 @@ void PG::handle_advance_map( << dendl; update_osdmap_ref(osdmap); pool.update(osdmap); - if (pool.info.last_change == osdmap_ref->get_epoch()) - on_pool_change(); AdvMap evt( osdmap, lastmap, newup, up_primary, newacting, acting_primary); recovery_state.handle_event(evt, rctx); + if (pool.info.last_change == osdmap_ref->get_epoch()) + on_pool_change(); } void PG::handle_activate_map(RecoveryCtx *rctx) -- 2.47.3