on_removal is now in ReplicatedPG in order to handle watcher state
and repop state. Addionally, workqueue dequeues are handled already
in OSD::_remove_pg.
Signed-off-by: Samuel Just <sam.just@inktank.com>
return false;
}
-
-void PG::on_removal()
-{
- osd->recovery_wq.dequeue(this);
- osd->scrub_wq.dequeue(this);
- osd->scrub_finalize_wq.dequeue(this);
- osd->snap_trim_wq.dequeue(this);
- osd->pg_stat_queue_dequeue(this);
-
- remove_watchers_and_notifies();
-}
-
void PG::set_last_peering_reset()
{
dout(20) << "set_last_peering_reset " << get_osdmap()->get_epoch() << dendl;
void handle_loaded(RecoveryCtx *rctx);
void handle_query_state(Formatter *f);
- void on_removal();
+ virtual void on_removal();
// abstract bits
}
}
+void ReplicatedPG::on_removal()
+{
+ dout(10) << "on_removal" << dendl;
+ apply_and_flush_repops(false);
+ remove_watchers_and_notifies();
+}
+
void ReplicatedPG::on_shutdown()
{
dout(10) << "on_shutdown" << dendl;
void on_role_change();
void on_change();
void on_activate();
+ void on_removal();
void on_shutdown();
};