mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
PG,ReplicatedPG: on_removal must handle repop and watcher state
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>
This commit is contained in:
parent
691741985a
commit
09af670b1d
@ -3682,18 +3682,6 @@ bool PG::old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch)
|
||||
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;
|
||||
|
@ -1498,7 +1498,7 @@ public:
|
||||
void handle_loaded(RecoveryCtx *rctx);
|
||||
void handle_query_state(Formatter *f);
|
||||
|
||||
void on_removal();
|
||||
virtual void on_removal();
|
||||
|
||||
|
||||
// abstract bits
|
||||
|
@ -5692,6 +5692,13 @@ void ReplicatedPG::apply_and_flush_repops(bool requeue)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -913,6 +913,7 @@ public:
|
||||
void on_role_change();
|
||||
void on_change();
|
||||
void on_activate();
|
||||
void on_removal();
|
||||
void on_shutdown();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user