]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::handle_advance_map: on_pool_change after handling the map change 5707/head
authorSamuel Just <sjust@redhat.com>
Thu, 27 Aug 2015 18:08:33 +0000 (11:08 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 27 Aug 2015 18:08:33 +0000 (11:08 -0700)
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 <sjust@redhat.com>
src/osd/PG.cc

index 36c664129a536007d1828f54430037091e9e5ae5..cf8faf696ec9206ea65a864c660ef45bde23f17d 100644 (file)
@@ -5279,12 +5279,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)